#pragma once
#include "Entity.h"
#include "CS_PeLightFade.h"
//烟花火花
class CS_PeFireworksSpark :
    public Entity
{
public:
    CS_PeFireworksSpark();
    void Init(std::weak_ptr<Entity> self) override;//初始化
    void Step() override;
    void Destroy() override;
    void Shoot(float dir_x, float dir_y, float speed);//设置发射方向和速度
    int exist_counter = -1;
    bool bDisappear = false;
    int disappear_counter = -1;
    int disappear_counter_max = 30;
    std::weak_ptr<CS_PeLightFade> peLight;
};

void SetCS_PeFireworksSpark(std::shared_ptr<Entity> parent, float x, float y, float dir_x, float dir_y, float speed);