diff options
author | max-001 <maxsmits21@kpnmail.nl> | 2024-11-05 13:37:31 +0100 |
---|---|---|
committer | max-001 <maxsmits21@kpnmail.nl> | 2024-11-05 13:37:31 +0100 |
commit | 84d92828e0087d468119b0078d93984186c3cc38 (patch) | |
tree | ce8962448747cf1a39b8ac67ee89f78d5755be3d /src | |
parent | a016ac2a146ce7c980a2b89d5fe6d079491b790b (diff) |
Improved test
Diffstat (limited to 'src')
-rw-r--r-- | src/example/ecs.cpp | 12 |
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>(); |