Debian Codegraph @

Sources/Jazz2/Actors/Environment/Bird.h

raw
1 #pragma once
2
3 #include "../ActorBase.h"
4
5 namespace Jazz2::Actors
6 {
7 class Player;
8 }
9
10 namespace Jazz2::Actors::Environment
11 {
12 /** @brief Bird */
13 class Bird : public ActorBase
14 {
15 DEATH_RUNTIME_OBJECT(ActorBase);
16
17 public:
18 Bird();
19
20 bool OnHandleCollision(std::shared_ptr<ActorBase> other) override;
21
22 static void Preload(const ActorActivationDetails& details);
23
24 /** @brief Leaves the owner */
25 void FlyAway();
26
27 protected:
28 Task<bool> OnActivatedAsync(const ActorActivationDetails& details) override;
29 void OnUpdate(float timeMult) override;
30 void OnAnimationFinished() override;
31
32 private:
33 std::uint8_t _type;
34 Player* _owner;
35 float _fireCooldown;
36 float _attackTime;
37
38 void TryFire();
39 };
40 }