diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-15 20:39:07 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-15 20:39:07 +0100 |
commit | e8cd950b8ebd152d76d588d4fedc7f4c239b0835 (patch) | |
tree | 7919d13a79d52f1365bc19bf1b435a6264ee5512 /src/example/ecs.cpp | |
parent | 5bee4515c1089ce3499bc3b74780db94f0c02306 (diff) | |
parent | 9f6475e7b0698c414138e2a8140b47f01ce9c5d1 (diff) |
merge `master` into `loek/cleanup`
Diffstat (limited to 'src/example/ecs.cpp')
-rw-r--r-- | src/example/ecs.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/example/ecs.cpp b/src/example/ecs.cpp index 5f83da1..711bde6 100644 --- a/src/example/ecs.cpp +++ b/src/example/ecs.cpp @@ -36,24 +36,21 @@ int main() { } // Get the Metadata and Transform components of each GameObject - vector<reference_wrapper<Metadata>> metadata - = mgr.get_components_by_type<Metadata>(); - vector<reference_wrapper<Transform>> transform - = mgr.get_components_by_type<Transform>(); + vector<reference_wrapper<Metadata>> metadata = mgr.get_components_by_type<Metadata>(); + vector<reference_wrapper<Transform>> transform = mgr.get_components_by_type<Transform>(); // Print the Metadata and Transform components for (auto & m : metadata) { cout << "Id: " << m.get().game_object_id << " Name: " << m.get().name - << " Tag: " << m.get().tag << " Parent: " << m.get().parent - << " Children: "; + << " Tag: " << m.get().tag << " Parent: " << m.get().parent << " Children: "; for (auto & c : m.get().children) { cout << c << " "; } cout << endl; } for (auto & t : transform) { - cout << "Id: " << t.get().game_object_id << " Position: [" - << t.get().position.x << ", " << t.get().position.y << "]" << endl; + cout << "Id: " << t.get().game_object_id << " Position: [" << t.get().position.x + << ", " << t.get().position.y << "]" << endl; } return 0; |