diff options
Diffstat (limited to 'src/crepe/api/LoopManager.cpp')
-rw-r--r-- | src/crepe/api/LoopManager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crepe/api/LoopManager.cpp b/src/crepe/api/LoopManager.cpp index f41c357..4d97e16 100644 --- a/src/crepe/api/LoopManager.cpp +++ b/src/crepe/api/LoopManager.cpp @@ -27,7 +27,10 @@ LoopManager::LoopManager() { [this](const ShutDownEvent & event) { return this->on_shutdown(event); }); } -void LoopManager::process_input() { this->get_system<InputSystem>().update(); } +void LoopManager::process_input() { + this->get_system<InputSystem>().update(); + this->event_manager.dispatch_events(); + } void LoopManager::start() { this->setup(); @@ -35,8 +38,6 @@ void LoopManager::start() { } void LoopManager::fixed_update() { - EventManager & ev = this->mediator.event_manager; - ev.dispatch_events(); this->get_system<ScriptSystem>().update(); this->get_system<PhysicsSystem>().update(); this->get_system<CollisionSystem>().update(); @@ -49,7 +50,6 @@ void LoopManager::loop() { while (this->loop_timer.get_lag() >= this->loop_timer.get_fixed_delta_time()) { this->process_input(); - event_manager.dispatch_events(); this->fixed_update(); this->loop_timer.advance_fixed_update(); } |