#pragma once
#include "Entity.h"
#include "EntityStateGravity.h"
#include "EntityStateResist.h"
#include "CS_PeDizzy.h"
#define CS_BOSS_AROWANA_CREATENAME L"CS_boss_arowana"
//Boss：龙鱼
class CS_Boss_Arowana :
    public Entity
{
public:
    CS_Boss_Arowana();
    void Init(std::weak_ptr<Entity> self) override;
    void SetState(int stateID, int lr) override;
    void SetState(std::wstring stateName, int lr) override;
    void Step() override;
    void Attack(std::weak_ptr<Entity> dst, int* outDamage, float* outAngle, bool* outTakedown, int* outElemType, float* outShockForce, float* outHeavy) override;
    bool Hurt(std::weak_ptr<Entity> src, int getDamage, float angle, bool bTakedown, int elemType, float shockForce, float heavy, int* outRealDamage) override;
    std::weak_ptr<Entity> BeginCaught(std::weak_ptr<Entity> e) override;//开始被某单位抓取（切换到被抓取状态）
    void EndCaught(std::weak_ptr<Entity> e) override;//被某单位抓取结束(退出被抓取状态）
    void Destroy() override;
    int stateID = 0;
    EntityStateGravity stateGravity;
    EntityStateResist stateResist;
    std::weak_ptr<CS_PeDizzy> peDizzy;
    bool bShowDizzy = false;
    bool bShowSilkRibbon = false;
    bool bCaught = false;
    int flee_counter = 0;
    int face = 0;
    int targetX = -1;
    int leftSide = -1;
    int rightSide = -1;
    std::vector<int>jumpX;
    bool bSetLightTail = false;
    bool bNormalMode = false;
    void AnimateStep();//动画
    void DashStep();//冲撞
    void FallToWaterStep();//落入水中
    void SwimStep();//游泳
    void JumpStep();//跳跃阶段
    void SetQuake();
    void SearchJumpPlace();
    static bool LightTail_Leave(std::weak_ptr<Entity> e);
    void SetLightTail();
};

std::shared_ptr<Entity> CreateCS_Boss_Arowana();