#pragma once
#include "Entity.h"
#define CS_ENEMY_SANDDRAGON_CREATENAME L"CS_enemy_sanddragon"
//敌人：沙龙
class CS_Enemy_SandDragon :
    public Entity
{
public:
    CS_Enemy_SandDragon();
    void Init(std::weak_ptr<Entity> self) override;
    void Step() override;
    void SetState(int stateID, int lr) 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;
    void Destroy() override;
    void Appear();
    void Disappear();
    std::weak_ptr<Entity> sand;
    int flash_counter = 0;
    bool bInvert = false;
    float srcY = 0;//隐藏时的Y坐标
    float dstY = 0;//出现时的Y坐标
    bool bHide = true;
    bool bShow = false;
    int appear_counter = 0;
    int appear_counter_max = 16;
    int shot_counter = 0;
    int shot_interval_counter = 0;
    int shot_interval_counter_max = 10;
    float shotSpeed = 0x200 / ts;
    int appear_interval_counter = 0;
    int appear_interval_counter_max = 120;
    int hideWait_counter = 0;
    int target_lost_counter = 0;
    int target_lost_counter_max = 120;
};

std::shared_ptr<Entity> CreateCS_Enemy_SandDragon();