aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/manager/EventManager.cpp
diff options
context:
space:
mode:
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..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());