#pragma once
#include "Entity.h"
#include "EntityState.h"
#include "EntityStateGravity.h"
#include "EntityStateResist.h"
#include "EntityStateSplash.h"
#define CS_KINGANI_CREATENAME L"CS_king_animate"
class CS_KingAni :
    public Entity
{
public:
    CS_KingAni();
    void Init(std::weak_ptr<Entity> self) override;
    void Step() override;
    void SetState(int stateID, int lr) override;
    void SetState(std::wstring stateName, int lr) override;
    void Destroy() override;
    //动画
    int stateID = 0;
    float animation_moveSpeed = 0x200 / ts;
    bool animation_delay = false;//走路动画延迟一帧（对齐到整格）
    int wink_counter = 0;
    //状态模块
    EntityStateGravity stateGravity;
    EntityStateResist stateResist;
    EntityStateSplash stateSplash;
    std::weak_ptr<Entity> sword;
};

std::shared_ptr<Entity> CreateCS_KingAni();