diff options
Diffstat (limited to 'game')
-rw-r--r-- | game/hud/SpeedScript.cpp | 6 | ||||
-rw-r--r-- | game/menus/mainmenu/TransitionStartSubScript.cpp | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/game/hud/SpeedScript.cpp b/game/hud/SpeedScript.cpp index 906a38f..2ced47a 100644 --- a/game/hud/SpeedScript.cpp +++ b/game/hud/SpeedScript.cpp @@ -1,5 +1,7 @@ #include "SpeedScript.h" +#include "../Events.h" +#include "api/BehaviorScript.h" #include <crepe/api/Event.h> #include <crepe/api/KeyCodes.h> #include <crepe/manager/LoopTimerManager.h> @@ -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) { diff --git a/game/menus/mainmenu/TransitionStartSubScript.cpp b/game/menus/mainmenu/TransitionStartSubScript.cpp index 63723cf..f737f7f 100644 --- a/game/menus/mainmenu/TransitionStartSubScript.cpp +++ b/game/menus/mainmenu/TransitionStartSubScript.cpp @@ -6,7 +6,7 @@ using namespace crepe; using namespace std; void TransitionStartSubScript::fixed_update(crepe::duration_t dt) { - if (this->get_key_state(Keycode::ENTER) && this->transition == false) + if (this->get_key_state(Keycode::SPACE) && this->transition == false) this->transition = true; } |