#pragma once
#include "Entity.h"
#include "EntityState.h"
#include "EntityStateGravity.h"
#include "EntityStateSplash.h"
#define CS_JACKANI_CREATENAME L"CS_jack_animate"
//杰克
class CS_JackAni :
    public Entity
{
public:
    CS_JackAni();
    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;
    //动画
    int stateID = 0;
    float animation_moveSpeed = 0x200 / ts;
    bool animation_delay = false;//走路动画延迟一帧（对齐到整格）
    int wink_counter = 0;
    int wonder_counter = 0;
    int wonder_counter_max = 60;
    int act_wait = 0;
    bool fishState = false;
    float floatSrcX = 0;//悬浮位置
    float floatSrcY = 0;
    bool bSetTarget = false;
    std::weak_ptr<Entity> animation_target;
    bool bSetLanding = false;
    //状态模块
    EntityStateGravity stateGravity;
    EntityStateSplash stateSplash;
private:
    //图层显示
    bool showGun = false;//显示枪
    void AnimateStep();//动画
};

std::shared_ptr<Entity> CreateCS_JackAni();