aboutsummaryrefslogtreecommitdiff
path: root/mwe/events/src/main.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-05 16:12:47 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-05 16:12:47 +0100
commite36ea050972fcaaf3d85d672755bad4ebb2dcd80 (patch)
tree5145e0b66650eea1df301106b7d197a586be65f3 /mwe/events/src/main.cpp
parent333b07775be1ef20fdb5909672c1e4dcabec1b40 (diff)
parentb770475741b7c33d57331f3139c55a3f237ad274 (diff)
merge `master` into `loek/savemgr`loek/savemgr
Diffstat (limited to 'mwe/events/src/main.cpp')
-rw-r--r--mwe/events/src/main.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/mwe/events/src/main.cpp b/mwe/events/src/main.cpp
index f7e0766..d49cf74 100644
--- a/mwe/events/src/main.cpp
+++ b/mwe/events/src/main.cpp
@@ -1,6 +1,10 @@
#include "customTypes.h"
#include "event.h"
+#include "iKeyListener.h"
+#include "iMouseListener.h"
+#include "keyListenerTest.h"
#include "loopManager.h"
+#include "mouseListenerTest.h"
#include <SDL2/SDL.h>
#include <iostream>
#include <memory>
@@ -44,10 +48,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));