-
Notifications
You must be signed in to change notification settings - Fork 0
/
ApplicationFacade.as
45 lines (35 loc) · 1.28 KB
/
ApplicationFacade.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
/**
* @author Saad Shams :: [email protected]
* Copy or reuse is prohibited.
* */
package {
import controller.StartupCommand;
import org.puremvc.as3.patterns.facade.Facade;
public class ApplicationFacade extends Facade {
public static const STARTUP:String = "startup";
public static const GAME:String = "game";
public static const WIN:String = "win";
public static const LOSE:String = "lose";
public static const COUNTDOWN_START:String = "countDownStart";
public static const END:String = "end";
public static const TIMEUP:String = "timeup";
public static const RESET:String = "reset";
public static const TOTAL_ATTEMPTS:int = 3; //total attempts allowed per level, Total 3, (0, 1, 2)
public static const TOTAL_LEVELS:int = 3; //if changed, change combinations in Game.as
public static var level:int = 0;
public static var attempts:int = 0;
public static function getInstance():ApplicationFacade {
if(instance == null){
instance = new ApplicationFacade();
}
return instance as ApplicationFacade;
}
override protected function initializeController():void {
super.initializeController();
registerCommand(STARTUP, StartupCommand);
}
public function startup(app:DungeonSteps):void {
sendNotification(STARTUP, app);
}
}
}