| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "../Enemies/EnemyBase.h" |
| 4 |
|
| 5 |
namespace Jazz2::Actors::Environment |
| 6 |
{ |
| 7 |
/** @brief Rolling rock */ |
| 8 |
class RollingRock : public Enemies::EnemyBase |
| 9 |
{ |
| 10 |
DEATH_RUNTIME_OBJECT(Enemies::EnemyBase); |
| 11 |
|
| 12 |
public: |
| 13 |
RollingRock(); |
| 14 |
|
| 15 |
static void Preload(const ActorActivationDetails& details); |
| 16 |
|
| 17 |
protected: |
| 18 |
Task<bool> OnActivatedAsync(const ActorActivationDetails& details) override; |
| 19 |
void OnUpdate(float timeMult) override; |
| 20 |
void OnUpdateHitbox() override; |
| 21 |
bool OnHandleCollision(std::shared_ptr<ActorBase> other) override; |
| 22 |
void OnTriggeredEvent(EventType eventType, std::uint8_t* eventParams) override; |
| 23 |
|
| 24 |
private: |
| 25 |
std::uint8_t _id; |
| 26 |
float _triggerSpeedX, _triggerSpeedY; |
| 27 |
float _delayLeft; |
| 28 |
bool _triggered; |
| 29 |
float _soundCooldown; |
| 30 |
|
| 31 |
bool IsPositionEmpty(float x, float y); |
| 32 |
}; |
| 33 |
} |