From 6112da75f973b1099fa95fcd9d3113c00302f5b4 Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Wed, 8 Jan 2025 10:46:14 +0100 Subject: player bullet working --- game/player/PlayerScript.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'game/player/PlayerScript.h') diff --git a/game/player/PlayerScript.h b/game/player/PlayerScript.h index cdb466f..cec27ce 100644 --- a/game/player/PlayerScript.h +++ b/game/player/PlayerScript.h @@ -2,7 +2,7 @@ #include #include - +#include class PlayerScript : public crepe::Script { public: void init(); @@ -14,4 +14,7 @@ private: void shoot(const crepe::vec2& location,float angle); private: int prev_anim = 0; + std::chrono::time_point last_fired; + std::chrono::duration shot_delay = std::chrono::duration(0.5); + }; -- cgit v1.2.3