42 lines
1000 B
C++
42 lines
1000 B
C++
#pragma once
|
|
|
|
#include "gridservice.h"
|
|
#include "obstacle.h"
|
|
#include "weakptr.h"
|
|
|
|
class RoomObstacle : public Obstacle
|
|
{
|
|
public:
|
|
Room* room = nullptr;
|
|
a8::XTimerAttacher xtimer_attacher;
|
|
bool is_treasure_box = false;
|
|
bool is_terminator_airdrop_box = false;
|
|
CreatureWeakPtr master;
|
|
|
|
virtual ~RoomObstacle() override;
|
|
virtual void Initialize() override;
|
|
virtual void RecalcSelfCollider() override;
|
|
virtual bool IsTerminatorAirDropBox(Room* room) override { return is_terminator_airdrop_box; }
|
|
virtual bool CanThroughable(Human* hum) override;
|
|
void ActiveTimerFunc();
|
|
void UpdateTimerFunc();
|
|
void Active();
|
|
|
|
private:
|
|
void Explosion();
|
|
void SpecExplosion();
|
|
void ActiveSelfExplosion();
|
|
void ActiveMine();
|
|
void ActiveTrap();
|
|
void ActivePosionGas();
|
|
|
|
protected:
|
|
bool temp_through_ = false;
|
|
std::set<GridCell*>* grid_list_ = nullptr;
|
|
int explosion_times_ = 0;
|
|
|
|
RoomObstacle();
|
|
|
|
friend class EntityFactory;
|
|
};
|