diff options
Diffstat (limited to 'game')
-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) { |