diff options
Diffstat (limited to 'game/QuitScript.cpp')
-rw-r--r-- | game/QuitScript.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/game/QuitScript.cpp b/game/QuitScript.cpp index fc33dcf..0c9f55a 100644 --- a/game/QuitScript.cpp +++ b/game/QuitScript.cpp @@ -5,19 +5,16 @@ #include <crepe/api/Event.h> #include <crepe/api/KeyCodes.h> - using namespace crepe; -bool QuitScript::on_event(const KeyPressEvent & ev){ +bool QuitScript::on_event(const KeyPressEvent & ev) { if (Keycode::ESCAPE == ev.key) { - trigger_event<ShutDownEvent>(ShutDownEvent{}); + trigger_event<ShutDownEvent>(ShutDownEvent {}); } return false; } - - -void QuitScript::init(){ +void QuitScript::init() { subscribe<KeyPressEvent>([this](const KeyPressEvent & ev) -> bool { return this->on_event(ev); }); |