diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2025-01-08 16:18:03 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2025-01-08 16:18:03 +0100 |
commit | 8edce6775ab0639a2a6eee3e561d3de0bb0c2cf1 (patch) | |
tree | bbcd5a708c59a44743661e7a0b7145e3c1baf90e /game | |
parent | 023cab57bef8738e3243f3720f56821c111c807e (diff) | |
parent | f857cb4013701a24cff5131d64e5ab238392faab (diff) |
Merge branch 'master' into niels/game
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; } |