diff options
author | Max-001 <maxsmits21@kpnmail.nl> | 2025-01-11 11:17:17 +0100 |
---|---|---|
committer | Max-001 <maxsmits21@kpnmail.nl> | 2025-01-11 11:17:17 +0100 |
commit | 0fb406e1b61a43558b29c1192a197cd56dcbfd18 (patch) | |
tree | 7c2d589e8a8af708890d589d36bf3656c8f7ae85 | |
parent | a57aa66f95c85e427b7ae51cadad4e4388d1a802 (diff) |
Fix: Set fixed background
-rw-r--r-- | game/PreviewScene.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/game/PreviewScene.cpp b/game/PreviewScene.cpp index 14a5560..e00170f 100644 --- a/game/PreviewScene.cpp +++ b/game/PreviewScene.cpp @@ -1,7 +1,10 @@ #include "PreviewScene.h" #include "Config.h" -#include "background/BackgroundSubScene.h" +#include "background/AquariumSubScene.h" +#include "background/ForestSubScene.h" +#include "background/HallwaySubScene.h" +#include "background/StartSubScene.h" #include "hud/HudScript.h" #include "hud/HudSubScene.h" #include "hud/SpeedScript.h" @@ -40,7 +43,20 @@ using namespace std; void PreviewScene::load_scene() { - BackgroundSubScene background(*this); + StartSubScene start; + HallwaySubScene hallway; + ForestSubScene forest; + AquariumSubScene aquarium; + + float begin_x = 400; + + begin_x = start.create(*this, begin_x); + + begin_x = hallway.create(*this, begin_x, 1, Color::YELLOW); + + begin_x = aquarium.create(*this, begin_x); + + begin_x = hallway.create(*this, begin_x, 2, Color::GREEN); GameObject camera = new_object("camera", "camera", vec2(650, 0)); camera.add_component<Camera>( |