#pragma once
#include "Entity.h"
#include "EntityStateGravity.h"
#include "EntityStateResist.h"
#include "EntityStateSplash.h"
#define CS_SAVEPOINT_CREATENAME L"CS_savepoint"
//保存点（可钓起）
class CS_SavePoint :
    public Entity
{
public:
    CS_SavePoint();
    void Init(std::weak_ptr<Entity> self) override;
    void Step() override;
    std::weak_ptr<Entity> BeginCaught(std::weak_ptr<Entity> e) override;//开始被某单位抓取（切换到被抓取状态）
    void EndCaught(std::weak_ptr<Entity> e) override;//被某单位抓取结束(退出被抓取状态）
    bool bCaught = false;
    int flee_counter = 60;
    EntityStateGravity stateGravity;
    EntityStateResist stateResist;
    EntityStateSplash stateSplash;
};

std::shared_ptr<Entity> CreateCS_SavePoint();