-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDungeonSteps.as
120 lines (91 loc) · 2.4 KB
/
DungeonSteps.as
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/**
* @author Saad Shams :: sshams@live.com
* Copy or reuse is prohibited.
* */
package {
import com.greensock.TweenLite;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.media.SoundChannel;
import view.components.Background;
import view.components.Chances;
import view.components.CountDown;
import view.components.Game;
import view.components.Lose;
import view.components.LoseFinal;
import view.components.Result;
import view.components.Start;
import view.components.Timeup;
import view.components.Win;
import view.components.WinFinal;
public class DungeonSteps extends MovieClip {
public var background:Background;
public var game:Game;
public var start:Start;
public var countDown:CountDown;
public var chances:Chances;
public var result:Result;
public var win:Win;
public var winFinal:WinFinal;
public var lose:Lose;
public var loseFinal:LoseFinal;
public var timeup:Timeup;
private var soundChannel:SoundChannel;
private var hiddenObject:Sprite;
public function DungeonSteps() {
}
public function startGame() {
new GameInstructions().play();
background = new Background();
addChild(background);
game = new Game();
addChild(game);
start = new Start();
addChild(start);
countDown = new CountDown();
addChild(countDown);
chances = new Chances();
addChild(chances);
//to remove
result = new Result();
addChild(result);
//popups
win = new Win();
winFinal = new WinFinal();
lose = new Lose();
loseFinal = new LoseFinal();
timeup = new Timeup();
win.name = "win";
winFinal.name = "winFinal";
lose.name = "lose";
loseFinal.name = "loseFinal";
timeup.name = "timeup";
soundChannel = new Atmosphere().play(0, int.MAX_VALUE);
new ApplicationFacade().startup(this);
}
public function addWin():void {
new WinSound().play();
addChild(win);
}
public function addWinFinal():void {
new WinSound().play();
addChild(winFinal);
}
public function addLose():void {
new LoseSound().play();
addChild(lose);
}
public function addLoseFinal():void {
new LoseSound().play();
addChild(loseFinal);
}
public function addTimeup():void {
new LoseSound().play();
addChild(timeup);
}
public function removeTimeup():void {
removeChild(timeup);
}
}
}