diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-12 19:35:19 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-12 19:35:19 +0100 |
commit | 1bfd582b7b7f762011f5f4b7f84e180cf20e9046 (patch) | |
tree | 6a827bd8ef14c05d108edabd1850611cdd2d3ef4 /src/example | |
parent | fd403d038b017ec8976023471073329896035e36 (diff) |
shielded mediator
Diffstat (limited to 'src/example')
-rw-r--r-- | src/example/game.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/example/game.cpp b/src/example/game.cpp index 5361f3a..16fe18f 100644 --- a/src/example/game.cpp +++ b/src/example/game.cpp @@ -160,15 +160,13 @@ public: void load_scene() { - Mediator & m = this->mediator; - ComponentManager & mgr = m.component_manager; Color color(0, 0, 0, 255); float screen_size_width = 320; float screen_size_height = 240; float world_collider = 1000; //define playable world - GameObject world = mgr.new_object( + GameObject world = new_object( "Name", "Tag", vec2{screen_size_width / 2, screen_size_height / 2}, 0, 1); world.add_component<Rigidbody>(Rigidbody::Data{ .mass = 0, @@ -196,7 +194,7 @@ public: .zoom = 1, }); - GameObject game_object1 = mgr.new_object( + GameObject game_object1 = new_object( "Name", "Tag", vec2{screen_size_width / 2, screen_size_height / 2}, 0, 1); game_object1.add_component<Rigidbody>(Rigidbody::Data{ .mass = 1, @@ -228,7 +226,7 @@ public: .active = false; - GameObject game_object2 = mgr.new_object( + GameObject game_object2 = new_object( "Name", "Tag", vec2{screen_size_width / 2, screen_size_height / 2}, 0, 1); game_object2.add_component<Rigidbody>(Rigidbody::Data{ .mass = 1, |