#pragma once
#include "CS_Fish.h"
#define CS_ENEMY_REDFISH_CREATENAME L"CS_enemy_redfish"
//敌人：赤鱼
class CS_Enemy_Redfish :
    public CS_Fish
{
public:
    CS_Enemy_Redfish();
    void Init(std::weak_ptr<Entity> self) override;
    void SetState(int stateID, int lr) override;
    void HurtAnimate() override;
    void AnimateSpeedStep() override;
    void SwimStep() override;
    int swimModeChangeCounter = 0;//游泳模式改变计时器
    int farAway_counter = 0;//远离计时器
    int farAway_x = 0;
    int farAway_y = 0;
    bool bNormalMode = false;
private:
    std::map<float, std::weak_ptr<Entity>> fleeList;
    std::map<float, LONG> fleePos;
    void TestMaxDir(float dstX, float dstY, float* outDirX, float* outDirY);//测试并寻找一个远离方位
};

std::shared_ptr<Entity> CreateCS_Enemy_Redfish();