diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2025-01-08 18:40:11 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2025-01-08 18:40:11 +0100 |
commit | ef3f5b0845ba127c0bfcda8c2fce37013fef3878 (patch) | |
tree | e5690ff875a662ee7603844e858d82428d973a78 /game/missile/MissileScript.h | |
parent | 424da5eb1500d90389d939cd0b3e6e75d729578d (diff) | |
parent | 2ad15f3efab481659543a1c03cd70a36fd297538 (diff) |
Merge branch 'master' of github.com:lonkaars/crepe into jaro/game
Diffstat (limited to 'game/missile/MissileScript.h')
-rw-r--r-- | game/missile/MissileScript.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/game/missile/MissileScript.h b/game/missile/MissileScript.h new file mode 100644 index 0000000..a492e18 --- /dev/null +++ b/game/missile/MissileScript.h @@ -0,0 +1,20 @@ +#pragma once + +#include <crepe/api/Script.h> + +class MissileScript : public crepe::Script { +private: + bool on_collision(const crepe::CollisionEvent & ev); + + bool seeking_disabled; + + // will be used to calculate when ai will be stopped + static constexpr int X_RANGE = 90; + bool is_in_x_range(const crepe::Transform & missile, const crepe::Transform & player); + void kill_missile(); + void activate(); + +public: + void init(); + void fixed_update(crepe::duration_t dt); +}; |