#pragma once
#include "Entity.h"
#include "EntityStateGravity.h"
#include "EntityStateResist.h"
#include "EntityStateSplash.h"
#define CS_SPARKITEM_CREATENAME L"CS_sparkitem"
//闪光点（可钓起）
class CS_SparkItem :
    public Entity
{
public:
    CS_SparkItem();
    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_SparkItem();