aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormax-001 <maxsmits21@kpnmail.nl>2024-11-05 13:37:31 +0100
committermax-001 <maxsmits21@kpnmail.nl>2024-11-05 13:37:31 +0100
commit84d92828e0087d468119b0078d93984186c3cc38 (patch)
treece8962448747cf1a39b8ac67ee89f78d5755be3d
parenta016ac2a146ce7c980a2b89d5fe6d079491b790b (diff)
Improved test
-rw-r--r--src/example/ecs.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/example/ecs.cpp b/src/example/ecs.cpp
index e37e8d4..2fd4ad8 100644
--- a/src/example/ecs.cpp
+++ b/src/example/ecs.cpp
@@ -11,11 +11,15 @@ using namespace std;
int main() {
GameObject body(0, "body", "person", Point{0, 0}, 0, 1);
- GameObject leg(1, "leg", "person", Point{1, 1}, 0, 1);
- GameObject foot(2, "foot", "person", Point{2, 2}, 0, 1);
+ GameObject rightLeg(1, "rightLeg", "person", Point{1, 1}, 0, 1);
+ GameObject leftLeg(2, "leftLeg", "person", Point{1, 1}, 0, 1);
+ GameObject rightFoot(3, "rightFoot", "person", Point{2, 2}, 0, 1);
+ GameObject leftFoot(4, "leftFoot", "person", Point{2, 2}, 0, 1);
- foot.set_parent(leg);
- leg.set_parent(body);
+ rightFoot.set_parent(rightLeg);
+ leftFoot.set_parent(leftLeg);
+ rightLeg.set_parent(body);
+ leftLeg.set_parent(body);
ComponentManager & mgr = ComponentManager::get_instance();
vector<reference_wrapper<Metadata>> metadata = mgr.get_components_by_type<Metadata>();