From 84d92828e0087d468119b0078d93984186c3cc38 Mon Sep 17 00:00:00 2001 From: max-001 Date: Tue, 5 Nov 2024 13:37:31 +0100 Subject: Improved test --- src/example/ecs.cpp | 12 ++++++++---- 1 file 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> metadata = mgr.get_components_by_type(); -- cgit v1.2.3