diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2025-01-08 14:57:09 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2025-01-08 14:57:09 +0100 |
commit | 714c8798dd0998ea15b1ba697962a97c586457fe (patch) | |
tree | 86d36b17a71845cd4b5d16a0e9abd11df0d55c03 /game/player/PlayerScript.h | |
parent | fbd7c84e13381922bf327e20c1abc65337142445 (diff) | |
parent | 0de6692dcb029540f4502c5a2f1a0c6634f7b61f (diff) |
Merge remote-tracking branch 'origin/wouter/enemyAI' into niels/game
Diffstat (limited to 'game/player/PlayerScript.h')
-rw-r--r-- | game/player/PlayerScript.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/game/player/PlayerScript.h b/game/player/PlayerScript.h index 482b40d..e7d860a 100644 --- a/game/player/PlayerScript.h +++ b/game/player/PlayerScript.h @@ -1,8 +1,8 @@ #pragma once +#include <chrono> #include <crepe/api/Event.h> #include <crepe/api/Script.h> - class PlayerScript : public crepe::Script { public: void init(); @@ -10,8 +10,13 @@ public: private: bool on_collision(const crepe::CollisionEvent & ev); + // bool on_key_up(const crepe::KeyReleaseEvent& ev); + void shoot(const crepe::vec2 & location, float angle); private: int prev_anim = 0; + std::chrono::time_point<std::chrono::steady_clock> last_fired; + std::chrono::duration<float> shot_delay = std::chrono::duration<float>(0.5); + int current_jetpack_sound = 0; }; |