diff options
Diffstat (limited to 'include/ui.hpp')
-rw-r--r-- | include/ui.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/ui.hpp b/include/ui.hpp index 519d259..67c1010 100644 --- a/include/ui.hpp +++ b/include/ui.hpp @@ -44,8 +44,13 @@ SDL_Keycode getControl(int index); #include <entityx/entityx.h> -class InputSystem : public entityx::System<InputSystem> { +class InputSystem : public entityx::System<InputSystem>, public entityx::Receiver<InputSystem> { public: + inline void configure(entityx::EventManager &ev) { + ev.subscribe<MainSDLEvent>(*this); + } + + void receive(const MainSDLEvent& event); void update(entityx::EntityManager &en, entityx::EventManager &ev, entityx::TimeDelta dt) override; }; |