aboutsummaryrefslogtreecommitdiff
path: root/game/background/BackgroundSubScene.cpp
blob: a954f0b1280c9969a91bef0f4328f21db0d9c238 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#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;

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 = hallway.create(scn, begin_x, 2, Color::MAGENTA);

	begin_x = aquarium.create(scn, begin_x);

	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 = aquarium.create(scn, begin_x);

	begin_x = hallway.create(scn, begin_x, 5, Color::RED);

	begin_x = forest.create(scn, begin_x, "3");

	begin_x = hallway.create(scn, begin_x, 6, Color::BLUE);

	begin_x = aquarium.create(scn, begin_x);

	begin_x = hallway.create(scn, begin_x, 7, Color::WHITE);

	begin_x = forest.create(scn, begin_x, "4");

	begin_x = hallway.create(scn, begin_x, 8, Color::YELLOW);

	begin_x = aquarium.create(scn, begin_x);

	begin_x = hallway.create(scn, begin_x, 9, Color::MAGENTA);

	begin_x = forest.create(scn, begin_x, "5");

	begin_x = hallway.create(scn, begin_x, 10, Color::CYAN);

	begin_x = aquarium.create(scn, begin_x);

	begin_x = hallway.create(scn, begin_x, 11, Color::GREEN);

	begin_x = forest.create(scn, begin_x, "6");

	begin_x = hallway.create(scn, begin_x, 12, Color::RED);

	begin_x = aquarium.create(scn, begin_x);

	begin_x = hallway.create(scn, begin_x, 13, Color::BLUE);

	begin_x = forest.create(scn, begin_x, "7");

	begin_x = hallway.create(scn, begin_x, 14, Color::WHITE);

	begin_x = aquarium.create(scn, begin_x);

	begin_x = hallway.create(scn, begin_x, 15, Color::YELLOW);

	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>();
}