aboutsummaryrefslogtreecommitdiff
path: root/game/background/BackgroundSubScene.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/background/BackgroundSubScene.cpp')
-rw-r--r--game/background/BackgroundSubScene.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/game/background/BackgroundSubScene.cpp b/game/background/BackgroundSubScene.cpp
index 0f54800..a954f0b 100644
--- a/game/background/BackgroundSubScene.cpp
+++ b/game/background/BackgroundSubScene.cpp
@@ -1,10 +1,13 @@
#include "BackgroundSubScene.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;
@@ -23,15 +26,17 @@ BackgroundSubScene::BackgroundSubScene(Scene & scn) {
begin_x = forest.create(scn, begin_x, "1");
- begin_x = hallway.create(scn, begin_x, 2, Color::MAGENTA);
+ begin_x += 3000;
+ //begin_x = hallway.create(scn, begin_x, 2, Color::MAGENTA);
begin_x = aquarium.create(scn, begin_x);
- begin_x = hallway.create(scn, begin_x, 3, Color::CYAN);
+ begin_x += 3000;
+ //begin_x = hallway.create(scn, begin_x, 3, Color::CYAN);
begin_x = forest.create(scn, begin_x, "2");
- begin_x = hallway.create(scn, begin_x, 4, Color::GREEN);
+ //begin_x = hallway.create(scn, begin_x, 4, Color::GREEN);
/*begin_x = aquarium.create(scn, begin_x);
@@ -80,4 +85,7 @@ BackgroundSubScene::BackgroundSubScene(Scene & scn) {
begin_x = forest.create(scn, begin_x, "8");
begin_x = hallway.create(scn, begin_x, 16, Color::MAGENTA);*/
+
+ GameObject scripts = scn.new_object("scrips_background", "background");
+ scripts.add_component<BehaviorScript>().set_script<HallwayScript>();
}