| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "../SolidObjectBase.h" |
| 4 |
|
| 5 |
namespace Jazz2::Actors::Environment |
| 6 |
{ |
| 7 |
/** @brief Bird cage */ |
| 8 |
class BirdCage : public SolidObjectBase |
| 9 |
{ |
| 10 |
DEATH_RUNTIME_OBJECT(SolidObjectBase); |
| 11 |
|
| 12 |
public: |
| 13 |
BirdCage(); |
| 14 |
|
| 15 |
bool OnHandleCollision(std::shared_ptr<ActorBase> other) override; |
| 16 |
bool CanCauseDamage(ActorBase* collider) override; |
| 17 |
|
| 18 |
static void Preload(const ActorActivationDetails& details); |
| 19 |
|
| 20 |
protected: |
| 21 |
Task<bool> OnActivatedAsync(const ActorActivationDetails& details) override; |
| 22 |
|
| 23 |
private: |
| 24 |
std::uint8_t _type; |
| 25 |
bool _activated; |
| 26 |
|
| 27 |
bool TryApplyToPlayer(Player* player); |
| 28 |
}; |
| 29 |
} |