diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-07 14:19:16 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-07 14:19:16 +0100 |
commit | a73ff31b67faa7e6a922cfb5598f56f80bc01d62 (patch) | |
tree | 04840dfbdbe6207100fbbc2aba04f48a46de1022 /src/crepe/manager/EventManager.cpp | |
parent | a0070890fcdb422db85660fc44bcc709832870b8 (diff) |
added loopTimer and eventManager to mediator and removed the singletons
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..9b0fa95 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()); |