#pragma once
#include "Entity.h"
#include "CS_PeLightFade.h"
#define CS_ENEMY_FIREFLY_CREATENAME L"CS_enemy_firefly"
//萤火虫
class CS_Enemy_Firefly :
    public Entity
{
public:
    CS_Enemy_Firefly();
    void Init(std::weak_ptr<Entity> self) override;
    void Step() override;
    void SetState(int stateID, int lr) override;
    std::weak_ptr<Entity> BeginCaught(std::weak_ptr<Entity> e) override;//开始被某单位抓取（切换到被抓取状态）
    void EndCaught(std::weak_ptr<Entity> e) override;//被某单位抓取结束(退出被抓取状态）
    void Destroy() override;
    int fly_counter = 0;
    float srcX = 0;
    float srcY = 0;
    std::weak_ptr<CS_PeLightFade> peLight;
    std::weak_ptr<CS_PeLightFade> peLightColor;
};

std::shared_ptr<Entity> CreateCS_Enemy_Firefly();