| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "BossBase.h" |
| 4 |
|
| 5 |
namespace Jazz2::Actors::Bosses |
| 6 |
{ |
| 7 |
/** @brief Queen (boss) */ |
| 8 |
class Queen : public BossBase |
| 9 |
{ |
| 10 |
DEATH_RUNTIME_OBJECT(BossBase); |
| 11 |
|
| 12 |
public: |
| 13 |
Queen(); |
| 14 |
~Queen(); |
| 15 |
|
| 16 |
bool OnHandleCollision(std::shared_ptr<ActorBase> other) override; |
| 17 |
|
| 18 |
static void Preload(const ActorActivationDetails& details); |
| 19 |
|
| 20 |
protected: |
| 21 |
Task<bool> OnActivatedAsync(const ActorActivationDetails& details) override; |
| 22 |
bool OnActivatedBoss() override; |
| 23 |
void OnUpdate(float timeMult) override; |
| 24 |
|
| 25 |
private: |
| 26 |
static constexpr std::int32_t StateTransition = -1; |
| 27 |
static constexpr std::int32_t StateWaiting = 0; |
| 28 |
static constexpr std::int32_t StateIdleToScream = 1; |
| 29 |
static constexpr std::int32_t StateIdleToStomp = 2; |
| 30 |
static constexpr std::int32_t StateIdleToBackstep = 3; |
| 31 |
static constexpr std::int32_t StateDead = 4; |
| 32 |
static constexpr std::int32_t StateScreaming = 5; |
| 33 |
|
| 34 |
#ifndef DOXYGEN_GENERATING_OUTPUT |
| 35 |
// Doxygen 1.12.0 outputs also private structs/unions even if it shouldn't |
| 36 |
class Brick : public EnemyBase |
| 37 |
{ |
| 38 |
protected: |
| 39 |
Task<bool> OnActivatedAsync(const ActorActivationDetails& details) override; |
| 40 |
void OnUpdate(float timeMult) override; |
| 41 |
bool OnPerish(ActorBase* collider) override; |
| 42 |
|
| 43 |
private: |
| 44 |
float _timeLeft; |
| 45 |
}; |
| 46 |
|
| 47 |
class InvisibleBlock : public ActorBase |
| 48 |
{ |
| 49 |
friend class Queen; |
| 50 |
|
| 51 |
protected: |
| 52 |
Task<bool> OnActivatedAsync(const ActorActivationDetails& details) override; |
| 53 |
void OnUpdate(float timeMult) override; |
| 54 |
}; |
| 55 |
#endif |
| 56 |
|
| 57 |
std::int32_t _state = StateWaiting; |
| 58 |
float _stateTime; |
| 59 |
std::uint8_t _endText; |
| 60 |
std::int32_t _lastHealth; |
| 61 |
bool _queuedBackstep; |
| 62 |
float _stepSize; |
| 63 |
Vector2f _originPos; |
| 64 |
std::shared_ptr<InvisibleBlock> _block; |
| 65 |
}; |
| 66 |
} |