diff options
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; |