diff options
Diffstat (limited to 'game/player/PlayerScript.h')
-rw-r--r-- | game/player/PlayerScript.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/game/player/PlayerScript.h b/game/player/PlayerScript.h index 482b40d..30f39c6 100644 --- a/game/player/PlayerScript.h +++ b/game/player/PlayerScript.h @@ -2,16 +2,20 @@ #include <crepe/api/Event.h> #include <crepe/api/Script.h> - +#include <chrono> class PlayerScript : public crepe::Script { public: void init(); void fixed_update(crepe::duration_t dt); - + 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; }; |