aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/InputSystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/system/InputSystem.cpp')
-rw-r--r--src/crepe/system/InputSystem.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/crepe/system/InputSystem.cpp b/src/crepe/system/InputSystem.cpp
index afd71fe..d24a33d 100644
--- a/src/crepe/system/InputSystem.cpp
+++ b/src/crepe/system/InputSystem.cpp
@@ -1,14 +1,15 @@
-#include "../ComponentManager.h"
+#include "../manager/ComponentManager.h"
+#include "../manager/EventManager.h"
#include "../api/Button.h"
-#include "../api/EventManager.h"
+
#include "InputSystem.h"
using namespace crepe;
void InputSystem::update() {
- ComponentManager & mgr = this->component_manager;
- EventManager & event_mgr = EventManager::get_instance();
+ ComponentManager& mgr = this->mediator.component_manager;
+ EventManager & event_mgr = this->mediator.event_manager;
std::vector<SDLContext::EventData> event_list = SDLContext::get_instance().get_events();
RefVector<Button> buttons = mgr.get_components_by_type<Button>();
RefVector<Camera> cameras = mgr.get_components_by_type<Camera>();
@@ -118,7 +119,7 @@ void InputSystem::update() {
}
void InputSystem::handle_move(const SDLContext::EventData & event_data,
const int world_mouse_x, const int world_mouse_y) {
- ComponentManager & mgr = this->component_manager;
+ ComponentManager& mgr = this->mediator.component_manager;
RefVector<Button> buttons = mgr.get_components_by_type<Button>();
@@ -146,7 +147,7 @@ void InputSystem::handle_move(const SDLContext::EventData & event_data,
void InputSystem::handle_click(const MouseButton & mouse_button, const int world_mouse_x,
const int world_mouse_y) {
- ComponentManager & mgr = this->component_manager;
+ ComponentManager& mgr = this->mediator.component_manager;
RefVector<Button> buttons = mgr.get_components_by_type<Button>();