aboutsummaryrefslogtreecommitdiff
path: root/game/player/PlayerScript.h
diff options
context:
space:
mode:
Diffstat (limited to 'game/player/PlayerScript.h')
-rw-r--r--game/player/PlayerScript.h5
1 files changed, 4 insertions, 1 deletions
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 <crepe/api/Event.h>
#include <crepe/api/Script.h>
-
+#include <chrono>
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<std::chrono::steady_clock> last_fired;
+ std::chrono::duration<float> shot_delay = std::chrono::duration<float>(0.5);
+
};