diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2025-01-08 16:08:39 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2025-01-08 16:08:39 +0100 |
commit | e2f9c0bcaf22aa73689305faca70f2ec4682f55c (patch) | |
tree | 8d113443a0f1f629dbfdf93c0c6e742c6671a98b /game/hud/SpeedScript.cpp | |
parent | e6666d662678239d1d0c4c71f271855fdcdc3800 (diff) |
disable time change
Diffstat (limited to 'game/hud/SpeedScript.cpp')
-rw-r--r-- | game/hud/SpeedScript.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/game/hud/SpeedScript.cpp b/game/hud/SpeedScript.cpp index 906a38f..73469d2 100644 --- a/game/hud/SpeedScript.cpp +++ b/game/hud/SpeedScript.cpp @@ -3,6 +3,8 @@ #include <crepe/api/Event.h> #include <crepe/api/KeyCodes.h> #include <crepe/manager/LoopTimerManager.h> +#include "../Events.h" +#include "api/BehaviorScript.h" using namespace crepe; using namespace std; @@ -21,6 +23,10 @@ void SpeedScript::init() { return true; }); + this->subscribe<EndGameEvent>([this](const EndGameEvent e) { + this->get_component<BehaviorScript>().active = false; + return false; + }); } void SpeedScript::fixed_update(crepe::duration_t dt) { |