From b2fb4028f13f47d89487d48a1cc1e3e062d81e35 Mon Sep 17 00:00:00 2001 From: Max-001 Date: Wed, 8 Jan 2025 11:08:30 +0100 Subject: Made background move to next position --- game/background/HallwaySubScene.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'game/background/HallwaySubScene.cpp') diff --git a/game/background/HallwaySubScene.cpp b/game/background/HallwaySubScene.cpp index 4d96c94..31af2d5 100644 --- a/game/background/HallwaySubScene.cpp +++ b/game/background/HallwaySubScene.cpp @@ -14,7 +14,7 @@ using namespace std; float HallwaySubScene::create( Scene & scn, float begin_x, unsigned int sector_num, Color sector_color ) { - GameObject begin = scn.new_object("hallway_begin", "background", vec2(begin_x, 0)); + GameObject begin = scn.new_object("hallway_begin", "background_hall", vec2(begin_x, 0)); Asset begin_asset {"asset/background/hallway/hallway1FG_1_TVOS.png"}; begin.add_component( begin_asset, @@ -30,7 +30,8 @@ float HallwaySubScene::create( this->add_lamp(begin, vec2(330, -120), 11); this->add_lamp(begin, vec2(430, -120), 9); - GameObject middle_1 = scn.new_object("hallway_middle", "background", vec2(begin_x, 0)); + GameObject middle_1 + = scn.new_object("hallway_middle", "background_hall", vec2(begin_x, 0)); Asset middle_asset {"asset/background/hallway/hallway1FG_2_TVOS.png"}; middle_1.add_component( middle_asset, @@ -42,7 +43,8 @@ float HallwaySubScene::create( ); begin_x += 600; - GameObject middle_2 = scn.new_object("hallway_middle", "background", vec2(begin_x, 0)); + GameObject middle_2 + = scn.new_object("hallway_middle", "background_hall", vec2(begin_x, 0)); Asset middle_asset_2 {"asset/background/hallway/hallway1FG_2_TVOS.png"}; middle_2.add_component( middle_asset_2, @@ -54,7 +56,8 @@ float HallwaySubScene::create( ); begin_x += 200; - GameObject middle_3 = scn.new_object("hallway_middle", "background", vec2(begin_x, 0)); + GameObject middle_3 + = scn.new_object("hallway_middle", "background_hall", vec2(begin_x, 0)); Asset middle_asset_3 {"asset/background/hallway/hallway1FG_2_TVOS.png"}; middle_3.add_component( middle_asset_3, @@ -68,7 +71,8 @@ float HallwaySubScene::create( this->add_lamp(middle_3, vec2(0, -120)); - GameObject middle_4 = scn.new_object("hallway_middle", "background", vec2(begin_x, 0)); + GameObject middle_4 + = scn.new_object("hallway_middle", "background_hall", vec2(begin_x, 0)); Asset middle_asset_4 {"asset/background/hallway/hallway1FG_2_TVOS.png"}; middle_4.add_component( middle_asset_4, @@ -80,7 +84,7 @@ float HallwaySubScene::create( ); begin_x += 600; - GameObject end = scn.new_object("hallway_end", "background", vec2(begin_x, 0)); + GameObject end = scn.new_object("hallway_end", "background_hall", vec2(begin_x, 0)); Asset end_asset {"asset/background/hallway/hallway1FG_1_TVOS.png"}; end.add_component( end_asset, -- cgit v1.2.3