#pragma once
#include "Entity.h"
#include "EntityStateSplash.h"
#define CS_EXP_CREATENAME L"CS_exp"
//经验
class CS_Exp :
    public Entity
{
public:
    CS_Exp();
    void Init(std::weak_ptr<Entity> self) override;
    void Step() override;
    void SetState(int stateID, int lr) override;
    void SetState(std::wstring stateName, int lr) override;
    bool Item(std::weak_ptr<Entity> src) override;
    void SetSize(int sz);
    void SetLeftFloat();
    void SetRightFloat();
    EntityStateSplash stateSplash;
    int act_no = 0;
    int direct = 0;
    int ani_wait = 0;
    int count1 = 0;
    bool lFloat = false;//向左上浮
    bool rFloat = false;//向右上浮
    bool limit_speed = true;
};
std::shared_ptr<Entity> CreateCS_Exp();
void SetCS_Exp(std::shared_ptr<Entity> parent, float x, float y, int num);
void SetCS_ExpLFloat(std::shared_ptr<Entity> parent, float x, float y, int num);
void SetCS_ExpRFloat(std::shared_ptr<Entity> parent, float x, float y, int num);
//掉落经验或者生命
void SetDropItem(std::shared_ptr<Entity> parent, float x, float y, int dropExp);
void SetDropItemLFloat(std::shared_ptr<Entity> parent, float x, float y, int dropExp);
void SetDropItemRFloat(std::shared_ptr<Entity> parent, float x, float y, int dropExp);