-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tutorial Steps.js
102 lines (95 loc) · 3.19 KB
/
Tutorial Steps.js
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
92
93
94
95
96
97
98
99
100
101
102
GameWorld.prototype.tutorialStep = function (value) {
if (this.mode === "tutorial_mode") {
this.balloonSpawning = false;
this.barrierSpawning = false;
if (this.score === 0) {
var balloon = new Balloon(900, 2, 1);
balloon.currentColor = "white";
this.balloons.push(balloon);
}
else if (this.score === 10) {
var balloon = new Balloon(900, 2, 1);
balloon.currentColor = "green";
this.balloons.push(balloon);
}
else if (this.score === 20) {
var balloon = new Balloon(900, 2, 1);
balloon.currentColor = "blue";
this.balloons.push(balloon);
}
else if (this.score === 30) {
var balloon = new Balloon(900, 2, 1);
balloon.currentColor = "red";
this.balloons.push(balloon);
}
else if (this.score === 40) {
var balloon = new Balloon(900, 2, 1);
balloon.currentColor = "rainbow";
this.balloons.push(balloon);
}
else if (this.score === 50) {
for (var i = 0; i < 19; i++) {
var colors = new Array("red", "green", "blue");
var rand1 = Math.floor(Math.random() * 3);
var rand2 = Math.floor(Math.random() * 3);
var balloon = new Balloon(this.rowPositions[rand1], rand1, 1);
balloon.currentColor = colors[rand2];
this.balloons.push(balloon);
}
var balloon = new Balloon(this.rowPositions[rand1], rand1, 1);
balloon.currentColor = colors[rand2];
this.balloons.push(balloon);
var balloon = new Balloon(700, 1, 1);
balloon.currentColor = "bomb";
this.balloons.push(balloon);
}
else if (this.score === 260) {
var barrier = new Barrier();
barrier.position = new Vector2(700, -110);
barrier.speed = 1.5;
this.barriers.push(barrier);
var balloon = new Balloon(900, 1, 1);
balloon.currentColor = "red";
this.balloons.push(balloon);
balloon = new Balloon(1100, 1, 1);
balloon.currentColor = "green";
this.balloons.push(balloon);
}
else if (this.score === 280) {
var balloon = new Balloon(900, 1, 1);
balloon.currentColor = "target";
this.balloons.push(balloon);
balloon = new Balloon(900, 2, 1);
balloon.currentColor = "green";
this.balloons.push(balloon);
}
else if (this.score === 300) {
var balloon = new Balloon(700, 1, 1);
balloon.currentColor = "ice";
this.balloons.push(balloon);
for (var i = 0; i < 4; i++) {
var colors = new Array("red", "green", "blue");
var rand1 = Math.floor(Math.random() * 3);
var rand2 = Math.floor(Math.random() * 3);
var balloon = new Balloon(this.rowPositions[rand1], rand1, 1);
balloon.currentColor = colors[rand2];
this.balloons.push(balloon);
}
}
else if (this.score === 340) {
this.rows = new Array(0, 0, 0)
}
else if (this.score > 340 && this.score <= 500) {
this.balloonsPerRow = 1;
this.balloonSpawning = true;
}
else if (this.score >= 520) {
for (var i=0;i<this.balloons.length; i++) {
this.balloons[i] = null
}
this.balloons = this.balloons.filter((a) => a)
this.balloonSpawning = false;
this.bossCount = 1;
}
}
};