diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2025-01-08 14:10:27 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2025-01-08 14:10:27 +0100 |
commit | b445a1716a46dc875e0b2180c1a1b6022ec7a6d3 (patch) | |
tree | 1395518417ef02ca8adfa961e0734ea7aeb71a6d /game/missile/MissileScript.h | |
parent | c9c9702edc58ff8f40b13dc6b86b216421f79e9b (diff) |
missile/preview/schedular/PreviewScene
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); +}; |