aboutsummaryrefslogtreecommitdiff
path: root/mwe/events/src/main.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-04 08:31:05 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-04 08:31:05 +0100
commit63d50eea4e389e73e26f41452829dd48e6190c70 (patch)
tree82a8ef7a28fe7e069dbe9830adc28fd49dd85846 /mwe/events/src/main.cpp
parent06f65659fc6ffde7cabd2135040cbfbf089e5a24 (diff)
parent2585dc3cab48ccad0cfa0c63354662d656c86c46 (diff)
Merge branch 'master' of github.com:lonkaars/crepe
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));