#pragma once
#include "Entity.h"
#include "EntityStateGravity.h"
#include "EntityStateResist.h"
//鱼（可钓的）
class CS_Fish :
    public Entity
{
public:
    CS_Fish();
    void Init(std::weak_ptr<Entity> self) 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;//被某单位抓取结束(退出被抓取状态）
    virtual void FleeStep();
    virtual void FleeEnd();
    virtual void HurtAnimate() = 0;
    virtual void AnimateSpeedStep() = 0;
    virtual void SwimStep() = 0;
    void ResistStep();
    bool bCaught = false;
    int flee_counter = 0;
    int dirChange_counter = 0;
    bool setWaterSplash = false;
    int downSwim = 0;
    EntityStateGravity stateGravity;
    EntityStateResist stateResist;
};

