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/player/PlayerScript.h | |
parent | 424da5eb1500d90389d939cd0b3e6e75d729578d (diff) | |
parent | 2ad15f3efab481659543a1c03cd70a36fd297538 (diff) |
Merge branch 'master' of github.com:lonkaars/crepe into jaro/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; }; |