aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authormax-001 <maxsmits21@kpnmail.nl>2024-11-22 09:36:35 +0100
committermax-001 <maxsmits21@kpnmail.nl>2024-11-22 09:36:35 +0100
commit7c21e34ae1898fce8c8051b5f1380e268da32140 (patch)
treed5710874f07aae44dcaad994c26c028d17012768 /src/test
parent07bca38a27f794ed6a2f74536f7a909530ce7df0 (diff)
Replaced ComponentManager reference by OptionalRef for late binding
Diffstat (limited to 'src/test')
-rw-r--r--src/test/SceneManagerTest.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/test/SceneManagerTest.cpp b/src/test/SceneManagerTest.cpp
index 1efcfb2..1706de0 100644
--- a/src/test/SceneManagerTest.cpp
+++ b/src/test/SceneManagerTest.cpp
@@ -12,10 +12,8 @@ using namespace crepe;
class ConcreteScene1 : public Scene {
public:
- using Scene::Scene;
-
void load_scene() {
- auto & mgr = this->component_manager;
+ ComponentManager & mgr = this->component_manager;
GameObject object1 = mgr.new_object("scene_1", "tag_scene_1", Vector2{0, 0}, 0, 1);
GameObject object2 = mgr.new_object("scene_1", "tag_scene_1", Vector2{1, 0}, 0, 1);
GameObject object3 = mgr.new_object("scene_1", "tag_scene_1", Vector2{2, 0}, 0, 1);
@@ -26,10 +24,8 @@ public:
class ConcreteScene2 : public Scene {
public:
- using Scene::Scene;
-
void load_scene() {
- auto & mgr = this->component_manager;
+ ComponentManager & mgr = this->component_manager;
GameObject object1 = mgr.new_object("scene_2", "tag_scene_2", Vector2{0, 0}, 0, 1);
GameObject object2 = mgr.new_object("scene_2", "tag_scene_2", Vector2{0, 1}, 0, 1);
GameObject object3 = mgr.new_object("scene_2", "tag_scene_2", Vector2{0, 2}, 0, 1);