diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-10-28 11:34:43 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-10-28 11:34:43 +0100 |
commit | f2136f836f9b9e9a6a6698f7bc6fba85a27ebebf (patch) | |
tree | 532d11ed8e9e27ff70eaa69fb874311ee60c5e74 /mwe/events/src/main.cpp | |
parent | 29f9a26046e35c7eb0157df92757ce8e39f1ec74 (diff) |
iKeyListener test and iMouseListener test working
Diffstat (limited to 'mwe/events/src/main.cpp')
-rw-r--r-- | mwe/events/src/main.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mwe/events/src/main.cpp b/mwe/events/src/main.cpp index d056f85..03dff16 100644 --- a/mwe/events/src/main.cpp +++ b/mwe/events/src/main.cpp @@ -6,6 +6,10 @@ #include "loopManager.h" #include "event.h" #include "customTypes.h" +#include "iKeyListener.h" +#include "iMouseListener.h" +#include "keyListenerTest.h" +#include "mouseListenerTest.h" class PlayerDamagedEvent : public Event { public: PlayerDamagedEvent(int damage, int playerID) @@ -46,10 +50,9 @@ void testCollisionEvent() { } int main(int argc, char * args[]) { LoopManager gameLoop; - // Create an event handler for KeyPressedEvent - // EventHandler<KeyPressedEvent> callback = [](const KeyPressedEvent& e) { - // onKeyPressed(e); - // }; + int testListenerId = 0; + KeyListenerTest keyListener(testListenerId); + MouseListenerTest mouseListener(testListenerId); // custom event class poc subscribe<PlayerDamagedEvent>(onPlayerDamaged); triggerEvent(PlayerDamagedEvent(50, 1)); |