aboutsummaryrefslogtreecommitdiff
path: root/game/background/BackgroundSubScene.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2025-01-11 21:32:30 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2025-01-11 21:32:30 +0100
commita6803980f1e74ecf1abb007b7c77f00d2cd92c43 (patch)
tree425ca961b27117d6e5d5fa0ae5cfca93351e0b33 /game/background/BackgroundSubScene.cpp
parent6bc0025e4c24ed6659d993f3469c10615fb0e273 (diff)
parent525636bb2158ecea68ebb9d6b8d2dc722524c5e5 (diff)
merge master into loek/doxygen
Diffstat (limited to 'game/background/BackgroundSubScene.cpp')
-rw-r--r--game/background/BackgroundSubScene.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/game/background/BackgroundSubScene.cpp b/game/background/BackgroundSubScene.cpp
new file mode 100644
index 0000000..4bbd977
--- /dev/null
+++ b/game/background/BackgroundSubScene.cpp
@@ -0,0 +1,37 @@
+#include "BackgroundSubScene.h"
+#include "AquariumScript.h"
+#include "AquariumSubScene.h"
+#include "ForestSubScene.h"
+#include "HallwayScript.h"
+#include "HallwaySubScene.h"
+#include "StartSubScene.h"
+
+#include <crepe/api/BehaviorScript.h>
+#include <crepe/api/Color.h>
+#include <crepe/api/Scene.h>
+
+using namespace crepe;
+using namespace std;
+
+BackgroundSubScene::BackgroundSubScene(Scene & scn) {
+ StartSubScene start;
+ HallwaySubScene hallway;
+ ForestSubScene forest;
+ AquariumSubScene aquarium;
+
+ float begin_x = 400;
+
+ begin_x = start.create(scn, begin_x);
+
+ begin_x = hallway.create(scn, begin_x, 1, Color::YELLOW);
+
+ begin_x = forest.create(scn, begin_x, "1");
+
+ begin_x += 3000;
+
+ begin_x = aquarium.create(scn, begin_x);
+
+ GameObject scripts = scn.new_object("scrips_background", "background");
+ scripts.add_component<BehaviorScript>().set_script<HallwayScript>();
+ scripts.add_component<BehaviorScript>().set_script<AquariumScript>();
+}