aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/manager/EventManager.cpp
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2024-12-14 11:40:33 +0100
committerJAROWMR <jarorutjes07@gmail.com>2024-12-14 11:40:33 +0100
commit061b2b8ab9aba67c1467cdd163fb7a04de95f4f1 (patch)
treee1960a83461e0d83a7027a88404af1a7c70f6dcd /src/crepe/manager/EventManager.cpp
parentfd2ebb54d0c2b269c15fc84a4ac77993efc917d7 (diff)
parentb9fc66f6922b1f40f2dbe14e8dfc4caa469654bc (diff)
Merge branch 'master' of github.com:lonkaars/crepe into jaro/collision-system
Diffstat (limited to 'src/crepe/manager/EventManager.cpp')
-rw-r--r--src/crepe/manager/EventManager.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/crepe/manager/EventManager.cpp b/src/crepe/manager/EventManager.cpp
index 20f0dd3..6aa49ee 100644
--- a/src/crepe/manager/EventManager.cpp
+++ b/src/crepe/manager/EventManager.cpp
@@ -3,11 +3,9 @@
using namespace crepe;
using namespace std;
-EventManager & EventManager::get_instance() {
- static EventManager instance;
- return instance;
+EventManager::EventManager(Mediator & mediator) : Manager(mediator) {
+ this->mediator.event_manager = *this;
}
-
void EventManager::dispatch_events() {
for (auto & event : this->events_queue) {
this->handle_event(event.type, event.channel, *event.event.get());