diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-28 10:13:11 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-28 10:13:11 +0100 |
commit | 6fd7cec7d4bbf5aeb361b3f1337671bb0f9af61b (patch) | |
tree | 01f6977c66a1e07e07aae42358a7e1a4e55ef53c /src/test/ScriptTest.cpp | |
parent | d1eed940b8119e95a14f1d08bf26184c7f0a0d8f (diff) |
manager mediator refactor
Diffstat (limited to 'src/test/ScriptTest.cpp')
-rw-r--r-- | src/test/ScriptTest.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/test/ScriptTest.cpp b/src/test/ScriptTest.cpp index 78d5061..3187ed2 100644 --- a/src/test/ScriptTest.cpp +++ b/src/test/ScriptTest.cpp @@ -4,10 +4,10 @@ #define private public #define protected public -#include <crepe/ComponentManager.h> +#include <crepe/manager/ComponentManager.h> +#include <crepe/manager/EventManager.h> #include <crepe/api/BehaviorScript.h> #include <crepe/api/Event.h> -#include <crepe/api/EventManager.h> #include <crepe/api/GameObject.h> #include <crepe/api/Script.h> #include <crepe/api/Vector2.h> @@ -20,10 +20,11 @@ using namespace testing; class MyEvent : public Event {}; class ScriptTest : public Test { + Mediator m; public: - ComponentManager component_manager{}; - ScriptSystem system{component_manager}; - EventManager & event_manager = EventManager::get_instance(); + ComponentManager component_manager{m}; + ScriptSystem system{m}; + EventManager & event_manager = m.event_manager; class MyScript : public Script { // NOTE: default (private) visibility of init and update shouldn't cause |