28 lines
482 B
C++
28 lines
482 B
C++
#pragma once
|
|
|
|
class Room;
|
|
class Hero;
|
|
class Obstacle;
|
|
|
|
class BoxDrop : public std::enable_shared_from_this<BoxDrop>
|
|
{
|
|
public:
|
|
|
|
BoxDrop(Room* room);
|
|
void Init();
|
|
void UnInit();
|
|
void OnBattleStart();
|
|
void OnHeroDeadDrop(Hero* hero);
|
|
void OnObstacleDeadDrop(Obstacle* ob);
|
|
|
|
private:
|
|
|
|
void Drop(int num, const glm::vec3& center);
|
|
void RequestBoxNum();
|
|
|
|
private:
|
|
Room* room_ = nullptr;
|
|
a8::XTimerWp get_box_num_timer_;
|
|
int box_num_ = 0;
|
|
};
|