#pragma once
#include "Entity.h"
#include "CS_Torch.h"
#include "CS_PeLightFade.h"
#define CS_TORCH_MECHANISM_CREATENAME L"CS_torch_mechanism"
//»ð¾æ»ú¹Ø
class CS_Torch_Mechanism :
    public Entity
{
public:
    CS_Torch_Mechanism();
    void Init(std::weak_ptr<Entity> self) override;
    void Step() override;
    void SetState(std::wstring stateName, int lr) override;
    bool Hurt(std::weak_ptr<Entity> src, int getDamage, float angle, bool bTakedown, int elemType, float shockForce, float heavy, int* outRealDamage) override;
    void Destroy() override;
    std::weak_ptr<CS_Torch> torch;
    int dispear_counter_max = 180;
    int dispear_counter = 0;
    std::weak_ptr<CS_PeLightFade> peLight;
    std::weak_ptr<CS_PeLightFade> peLightColor;
};

std::shared_ptr<Entity> CreateCS_Torch_Mechanism();