Debian Codegraph @

Sources/Jazz2/Actors/Enemies/Bosses/Bilsy.h

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