aboutsummaryrefslogtreecommitdiff
path: root/src/example/ecs.cpp
diff options
context:
space:
mode:
authormax-001 <maxsmits21@kpnmail.nl>2024-11-06 09:52:05 +0100
committermax-001 <maxsmits21@kpnmail.nl>2024-11-06 09:52:05 +0100
commitf4083c161a1176c900629ba61d96843645fc7be5 (patch)
tree0c136c9af142a4f7018a7441ec879b3b41da02c0 /src/example/ecs.cpp
parentbf4c172f2709adf5a6f210bae60e16972e8decad (diff)
parent6ce2c14077e3e6dd01398d582b42dc50e9141f54 (diff)
Merge remote-tracking branch 'origin/master' into max/scenes
Diffstat (limited to 'src/example/ecs.cpp')
-rw-r--r--src/example/ecs.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/example/ecs.cpp b/src/example/ecs.cpp
index eb5eeba..6f9752e 100644
--- a/src/example/ecs.cpp
+++ b/src/example/ecs.cpp
@@ -12,16 +12,16 @@ int main() {
// Create a few GameObjects
try {
GameObject body(0, "body", "person", Point{0, 0}, 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);
+ GameObject right_leg(1, "rightLeg", "person", Point{1, 1}, 0, 1);
+ GameObject left_leg(2, "leftLeg", "person", Point{1, 1}, 0, 1);
+ GameObject right_foot(3, "rightFoot", "person", Point{2, 2}, 0, 1);
+ GameObject left_foot(4, "leftFoot", "person", Point{2, 2}, 0, 1);
// Set the parent of each GameObject
- rightFoot.set_parent(rightLeg);
- leftFoot.set_parent(leftLeg);
- rightLeg.set_parent(body);
- leftLeg.set_parent(body);
+ right_foot.set_parent(right_leg);
+ left_foot.set_parent(left_leg);
+ right_leg.set_parent(body);
+ left_leg.set_parent(body);
// Adding a second Transform component is not allowed and will invoke an exception
body.add_component<Transform>(Point{10, 10}, 0, 1);