Debian Codegraph @

Sources/Jazz2/Actors/Environment/AmbientBubbles.h

raw
1 #pragma once
2
3 #include "../ActorBase.h"
4
5 namespace Jazz2::Actors::Environment
6 {
7 /** @brief Ambient bubbles */
8 class AmbientBubbles : public ActorBase
9 {
10 DEATH_RUNTIME_OBJECT(ActorBase);
11
12 public:
13 AmbientBubbles();
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
21 private:
22 static constexpr float BaseTime = 20.0f;
23
24 uint8_t _speed;
25 float _cooldown;
26 std::int32_t _bubblesLeft;
27 float _delay;
28
29 void SpawnBubbles(std::int32_t count);
30 };
31 }