diff options
author | max-001 <maxsmits21@kpnmail.nl> | 2024-12-05 17:26:41 +0100 |
---|---|---|
committer | max-001 <maxsmits21@kpnmail.nl> | 2024-12-05 17:26:41 +0100 |
commit | e617b4f002638e37dbe4d2ce13849728e7e82c78 (patch) | |
tree | 8b3bc87b97623043d07eaa40510454209955f1c9 /src/example/AITest.cpp | |
parent | 0b942f4d6eb87fb623afbbae617478674c612ccc (diff) |
Used Mediator
Diffstat (limited to 'src/example/AITest.cpp')
-rw-r--r-- | src/example/AITest.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/example/AITest.cpp b/src/example/AITest.cpp index 341e1de..71aacb2 100644 --- a/src/example/AITest.cpp +++ b/src/example/AITest.cpp @@ -1,6 +1,7 @@ +#include <crepe/manager/Mediator.h> #include <SDL2/SDL_timer.h> #include <chrono> -#include <crepe/ComponentManager.h> +#include <crepe/manager/ComponentManager.h> #include <crepe/api/AI.h> #include <crepe/api/Camera.h> #include <crepe/api/Color.h> @@ -16,7 +17,8 @@ using namespace std; class Scene1 : public Scene { public: void load_scene() override { - ComponentManager & mgr = this->component_manager; + Mediator & mediator = this->mediator; + ComponentManager & mgr = mediator.component_manager; GameObject game_object1 = mgr.new_object("", "", vec2{250, 250}, 0, 1); GameObject game_object2 = mgr.new_object("", "", vec2{0, 0}, 0, 1); |