2017-07-10 18:06:22 +00:00
|
|
|
/********************
|
|
|
|
|
|
|
|
0. Introduction
|
|
|
|
1. One Game
|
|
|
|
2. Repeated Game
|
|
|
|
3. One Tournament
|
|
|
|
4. Repeated Tournament
|
|
|
|
5. Making Mistaeks
|
|
|
|
6. Sandbox
|
|
|
|
7. Conclusion
|
|
|
|
X. Credits
|
|
|
|
|
|
|
|
Labels should be in the en.html folder
|
|
|
|
|
|
|
|
*********************/
|
2017-07-20 18:45:11 +00:00
|
|
|
|
|
|
|
Loader.addToManifest(Loader.manifest,{
|
2017-07-20 22:16:35 +00:00
|
|
|
|
|
|
|
// CSS ASSETS
|
2017-07-20 18:45:11 +00:00
|
|
|
cssAsset0: "assets/ui/button.png",
|
|
|
|
cssAsset1: "assets/ui/button_short.png",
|
|
|
|
cssAsset2: "assets/ui/button_long.png",
|
|
|
|
cssAsset3: "assets/ui/sandbox_tabs.png",
|
|
|
|
cssAsset4: "assets/ui/sandbox_incdec.png",
|
|
|
|
cssAsset5: "assets/ui/slider_bg.png",
|
|
|
|
cssAsset6: "assets/ui/slider_knob.png",
|
|
|
|
cssAsset7: "assets/ui/sandbox_hats.png",
|
|
|
|
cssAsset8: "assets/ui/scratch.png",
|
|
|
|
cssAsset9: "assets/iterated/iterated_scoreboard.png",
|
|
|
|
cssAsset10: "assets/tournament/peep_characters.png",
|
|
|
|
cssAsset11: "assets/ui/sandbox_hats.png",
|
2017-07-20 22:16:35 +00:00
|
|
|
cssAsset12: "assets/tournament/score_small.png",
|
|
|
|
|
|
|
|
// Music!
|
|
|
|
bg_music: "assets/sounds/bg_music.mp3"
|
|
|
|
|
2017-07-20 18:45:11 +00:00
|
|
|
});
|
|
|
|
|
2017-07-10 15:38:20 +00:00
|
|
|
SLIDES.push({
|
|
|
|
|
2017-07-20 18:45:11 +00:00
|
|
|
//id: "preloader",
|
2017-07-10 18:06:22 +00:00
|
|
|
onstart: function(self){
|
2017-07-10 15:38:20 +00:00
|
|
|
|
2017-07-20 18:45:11 +00:00
|
|
|
var o = self.objects;
|
|
|
|
|
2017-07-10 15:38:20 +00:00
|
|
|
// Splash in background
|
2017-07-10 18:06:22 +00:00
|
|
|
self.add({ id:"splash", type:"Splash" });
|
2017-07-10 15:38:20 +00:00
|
|
|
|
2017-07-20 18:45:11 +00:00
|
|
|
// TITLE TEXT
|
|
|
|
self.add({
|
|
|
|
id:"title", type:"TextBox",
|
|
|
|
x:130, y:80, width:700,
|
|
|
|
size:100, lineHeight:0.9, align:"center",
|
|
|
|
text_id:"title"
|
|
|
|
});
|
|
|
|
self.add({
|
|
|
|
id:"subtitle", type:"TextBox",
|
|
|
|
x:297, y:344, width:360,
|
|
|
|
align:"center", color:"#aaa", size:15,
|
|
|
|
text_id:"subtitle"
|
|
|
|
});
|
|
|
|
|
|
|
|
// Button
|
|
|
|
self.add({
|
|
|
|
id:"loading_button", type:"Button", x:382, y:410,
|
|
|
|
text_id:"loading",
|
|
|
|
active:false
|
|
|
|
});
|
|
|
|
var _loadingWords = function(ratio){
|
|
|
|
ratio = Math.round(ratio*100);
|
|
|
|
o.loading_button.setText2(Words.get("loading")+" "+ratio+"%");
|
|
|
|
};
|
|
|
|
|
|
|
|
// PRELOADER
|
|
|
|
listen(self,"preloader/progress", function(ratio){
|
|
|
|
_loadingWords(ratio);
|
|
|
|
});
|
|
|
|
listen(self,"preloader/done", function(){
|
|
|
|
o.loading_button.setText("loading_done");
|
|
|
|
o.loading_button.activate();
|
2017-07-20 22:16:35 +00:00
|
|
|
o.loading_button.config.onclick = function(){
|
|
|
|
publish("start/game");
|
|
|
|
Loader.sounds.bg_music.volume(0.8).loop(true).play(); // play music!
|
|
|
|
};
|
2017-07-20 18:45:11 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
onend: function(self){
|
|
|
|
unlisten(self);
|
|
|
|
self.remove("title");
|
|
|
|
self.remove("subtitle");
|
|
|
|
self.remove("loading_button");
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
SLIDES.push({
|
|
|
|
id: "intro",
|
|
|
|
onjump: function(self){
|
|
|
|
// Splash in background
|
|
|
|
self.add({ id:"splash", type:"Splash" });
|
|
|
|
},
|
|
|
|
onstart: function(self){
|
|
|
|
|
|
|
|
var o = self.objects;
|
|
|
|
|
2017-07-10 15:38:20 +00:00
|
|
|
// Circular Wordbox
|
2017-07-10 18:06:22 +00:00
|
|
|
self.add({
|
2017-07-10 15:38:20 +00:00
|
|
|
id:"intro_text", type:"TextBox",
|
2017-07-15 02:29:31 +00:00
|
|
|
x:130, y:10, width:700, height:500, align:"center",
|
2017-07-10 18:06:22 +00:00
|
|
|
text_id:"intro"
|
|
|
|
});
|
2017-07-10 15:38:20 +00:00
|
|
|
|
|
|
|
// Button
|
2017-07-10 18:06:22 +00:00
|
|
|
self.add({
|
2017-07-13 15:07:33 +00:00
|
|
|
id:"intro_button", type:"Button", x:304, y:466, size:"long",
|
|
|
|
text_id:"intro_button",
|
2017-07-10 15:38:20 +00:00
|
|
|
message:"slideshow/scratch"
|
2017-07-10 18:06:22 +00:00
|
|
|
});
|
2017-07-10 15:38:20 +00:00
|
|
|
|
2017-07-20 18:45:11 +00:00
|
|
|
_hide(o.intro_text); _fadeIn(o.intro_text, 200);
|
|
|
|
_hide(o.intro_button); _fadeIn(o.intro_button, 700);
|
|
|
|
|
2017-07-10 18:06:22 +00:00
|
|
|
},
|
|
|
|
onend: function(self){
|
|
|
|
self.clear();
|
|
|
|
}
|
2017-07-10 15:38:20 +00:00
|
|
|
|
|
|
|
});
|