From 9416841ad776d9117bc3b12ee3ceb9a8c7af4c73 Mon Sep 17 00:00:00 2001 From: JAROWMR Date: Tue, 3 Dec 2024 19:44:01 +0100 Subject: removed part of if --- src/example/game.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/example/game.cpp') diff --git a/src/example/game.cpp b/src/example/game.cpp index 4e16d4a..5e3fab7 100644 --- a/src/example/game.cpp +++ b/src/example/game.cpp @@ -52,11 +52,11 @@ public: .constraints = {0, 0, 0}, .offset = {0,0} }); - world.add_component(vec2{0, 0-(screen_size_height/2+world_collider/2)}, world_collider, world_collider);; // Top - world.add_component(vec2{0, screen_size_height/2+world_collider/2}, world_collider, world_collider); // Bottom - world.add_component(vec2{0-(screen_size_width/2+world_collider/2), 0}, world_collider, world_collider); // Left - world.add_component(vec2{screen_size_width/2+world_collider/2, 0}, world_collider, world_collider); // right - + world.add_component(vec2{0, 0-(screen_size_height/2+world_collider/2)}, vec2{world_collider, world_collider});; // Top + world.add_component(vec2{0, screen_size_height/2+world_collider/2}, vec2{world_collider, world_collider}); // Bottom + world.add_component(vec2{0-(screen_size_width/2+world_collider/2), 0}, vec2{world_collider, world_collider}); // Left + world.add_component(vec2{screen_size_width/2+world_collider/2, 0}, vec2{world_collider, world_collider}); // right + world.add_component(Color::WHITE, ivec2{640, 480},vec2{640, 480}, 1.0f); GameObject game_object1 = mgr.new_object("Name", "Tag", vec2{screen_size_width/2, screen_size_height/2}, 0, 1); game_object1.add_component(Rigidbody::Data{ @@ -68,11 +68,10 @@ public: .elastisity_coefficient = 1, .offset = {0,0}, }); - game_object1.add_component(vec2{0, 0}, 20, 20); + game_object1.add_component(vec2{0, 0}, vec2{20, 20}); game_object1.add_component().set_script(); auto img = Texture("asset/texture/green_square.png"); game_object1.add_component(img, color, Sprite::FlipSettings{false, false}, 1, 1, 500); - game_object1.add_component(Color::WHITE, ivec2{1080, 720},vec2{2000, 2000}, 1.0f); } string get_name() const { return "scene1"; } -- cgit v1.2.3