aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-12-14 11:29:16 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-12-14 11:29:16 +0100
commit6ddb8c0e7003a66a7b350f7a11ef80803c180307 (patch)
treeaa985ae75aeb9c102af9d94b9247655435bf5230 /src/test
parent1076fb0e44611c29257b87eaa2cf51ad5046f133 (diff)
parentb9fc66f6922b1f40f2dbe14e8dfc4caa469654bc (diff)
Merge branch 'master' into loek/replay
Diffstat (limited to 'src/test')
-rw-r--r--src/test/SceneManagerTest.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/test/SceneManagerTest.cpp b/src/test/SceneManagerTest.cpp
index 9bb260c..480e07a 100644
--- a/src/test/SceneManagerTest.cpp
+++ b/src/test/SceneManagerTest.cpp
@@ -15,11 +15,9 @@ using namespace crepe;
class ConcreteScene1 : public Scene {
public:
void load_scene() {
- Mediator & mediator = this->mediator;
- ComponentManager & mgr = mediator.component_manager;
- GameObject object1 = mgr.new_object("scene_1", "tag_scene_1", vec2{0, 0}, 0, 1);
- GameObject object2 = mgr.new_object("scene_1", "tag_scene_1", vec2{1, 0}, 0, 1);
- GameObject object3 = mgr.new_object("scene_1", "tag_scene_1", vec2{2, 0}, 0, 1);
+ GameObject object1 = new_object("scene_1", "tag_scene_1", vec2{0, 0}, 0, 1);
+ GameObject object2 = new_object("scene_1", "tag_scene_1", vec2{1, 0}, 0, 1);
+ GameObject object3 = new_object("scene_1", "tag_scene_1", vec2{2, 0}, 0, 1);
}
string get_name() const { return "scene1"; }
@@ -28,12 +26,10 @@ public:
class ConcreteScene2 : public Scene {
public:
void load_scene() {
- Mediator & mediator = this->mediator;
- ComponentManager & mgr = mediator.component_manager;
- GameObject object1 = mgr.new_object("scene_2", "tag_scene_2", vec2{0, 0}, 0, 1);
- GameObject object2 = mgr.new_object("scene_2", "tag_scene_2", vec2{0, 1}, 0, 1);
- GameObject object3 = mgr.new_object("scene_2", "tag_scene_2", vec2{0, 2}, 0, 1);
- GameObject object4 = mgr.new_object("scene_2", "tag_scene_2", vec2{0, 3}, 0, 1);
+ GameObject object1 = new_object("scene_2", "tag_scene_2", vec2{0, 0}, 0, 1);
+ GameObject object2 = new_object("scene_2", "tag_scene_2", vec2{0, 1}, 0, 1);
+ GameObject object3 = new_object("scene_2", "tag_scene_2", vec2{0, 2}, 0, 1);
+ GameObject object4 = new_object("scene_2", "tag_scene_2", vec2{0, 3}, 0, 1);
}
string get_name() const { return "scene2"; }
@@ -44,9 +40,7 @@ public:
ConcreteScene3(const string & name) : name(name) {}
void load_scene() {
- Mediator & mediator = this->mediator;
- ComponentManager & mgr = mediator.component_manager;
- GameObject object1 = mgr.new_object("scene_3", "tag_scene_3", vec2{0, 0}, 0, 1);
+ GameObject object1 = new_object("scene_3", "tag_scene_3", vec2{0, 0}, 0, 1);
}
string get_name() const { return name; }