diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-14 11:40:33 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-14 11:40:33 +0100 |
commit | 061b2b8ab9aba67c1467cdd163fb7a04de95f4f1 (patch) | |
tree | e1960a83461e0d83a7027a88404af1a7c70f6dcd /src/crepe/manager/EventManager.cpp | |
parent | fd2ebb54d0c2b269c15fc84a4ac77993efc917d7 (diff) | |
parent | b9fc66f6922b1f40f2dbe14e8dfc4caa469654bc (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.cpp | 6 |
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()); |