2019-02-18 20:59:10 +00:00
|
|
|
// Load assets
|
|
|
|
Loader.addScenes([
|
2019-05-22 19:47:13 +00:00
|
|
|
//"scenes/intro.md",
|
|
|
|
//"scenes/act1.md",
|
|
|
|
//"scenes/act1_end.md",
|
2019-05-07 14:55:09 +00:00
|
|
|
//"scenes/PROMO.md"
|
2019-06-14 15:03:30 +00:00
|
|
|
//"scenes/act2.md",
|
2019-06-18 20:21:14 +00:00
|
|
|
"scenes/act4.md",
|
2019-02-18 20:59:10 +00:00
|
|
|
]);
|
2019-05-05 19:56:00 +00:00
|
|
|
Loader.load(function(progress){
|
2019-04-23 19:12:41 +00:00
|
|
|
|
2019-05-05 19:56:00 +00:00
|
|
|
$("#loading_bar_bg").style.height = (progress*50)+"px";
|
|
|
|
|
|
|
|
}).then(function(){
|
|
|
|
|
|
|
|
$("#loading").setAttribute("loaded","yes");
|
2019-04-29 19:19:44 +00:00
|
|
|
$("#loading").onclick = function(){
|
2019-06-06 16:32:57 +00:00
|
|
|
//sfx("pop");
|
2019-04-29 19:19:44 +00:00
|
|
|
publish('START_GAME');
|
|
|
|
};
|
2019-04-27 13:11:06 +00:00
|
|
|
|
2019-02-18 20:59:10 +00:00
|
|
|
Game.init();
|
2019-04-24 19:42:13 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
subscribe("START_GAME", function(){
|
2019-05-05 19:56:00 +00:00
|
|
|
|
2019-04-24 19:42:13 +00:00
|
|
|
$("#loading").style.display = "none";
|
|
|
|
Game.start();
|
2019-05-05 19:56:00 +00:00
|
|
|
|
2019-06-17 19:33:15 +00:00
|
|
|
Game.goto("act4");
|
2019-04-18 11:40:22 +00:00
|
|
|
|
2019-02-18 20:59:10 +00:00
|
|
|
});
|