endscreen
This commit is contained in:
parent
e0eb95a468
commit
f0b522bb44
|
@ -22,6 +22,10 @@
|
||||||
<div id="loading_progress"></div>
|
<div id="loading_progress"></div>
|
||||||
<div id="loading_done">play!</div>
|
<div id="loading_done">play!</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="end_of_demo">
|
||||||
|
<div id="loading_progress"></div>
|
||||||
|
<div id="loading_done">play!</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -2,11 +2,20 @@
|
||||||
|
|
||||||
`SceneSetup.act1_end()`
|
`SceneSetup.act1_end()`
|
||||||
|
|
||||||
|
(...2000)
|
||||||
|
|
||||||
n: TOTAL FEARS USED
|
n: TOTAL FEARS USED
|
||||||
|
|
||||||
n: *BEING HARMED:* 3
|
n: #harm# *BEING HARMED:* 3
|
||||||
|
|
||||||
n: *BEING UNLOVED:* 1
|
n: #alone# *BEING UNLOVED:* 1
|
||||||
|
|
||||||
n: *BEING A BAD PERSON:* 4
|
n: #bad# *BEING A BAD PERSON:* 4
|
||||||
|
|
||||||
|
(...4000)
|
||||||
|
|
||||||
|
`Game.clearText()`
|
||||||
|
|
||||||
|
(...2000)
|
||||||
|
|
||||||
|
`publish("END_OF_DEMO")`
|
||||||
|
|
|
@ -189,7 +189,7 @@ function BG_Act1_Outro(){
|
||||||
}
|
}
|
||||||
|
|
||||||
// NEXT SCENE?
|
// NEXT SCENE?
|
||||||
if(frameTicker>=270/30){
|
if(frameTicker>=320/30){
|
||||||
Game.goto("act1_end");
|
Game.goto("act1_end");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,5 +39,11 @@ SceneSetup.act1_end = function(){
|
||||||
|
|
||||||
Game.resetScene();
|
Game.resetScene();
|
||||||
music(null);
|
music(null);
|
||||||
|
stopAllSounds();
|
||||||
|
|
||||||
|
// HACK
|
||||||
|
Game.FORCE_TEXT_Y = 52;
|
||||||
|
$("#game_container").style.background = "#000";
|
||||||
|
$("#game_choices").style.display = "none";
|
||||||
|
|
||||||
};
|
};
|
|
@ -226,13 +226,18 @@ Game.immediatePromise = function(){
|
||||||
};
|
};
|
||||||
|
|
||||||
// Move the text DOM to latest
|
// Move the text DOM to latest
|
||||||
|
Game.FORCE_TEXT_Y = -1;
|
||||||
Game.updateText = function(instant){
|
Game.updateText = function(instant){
|
||||||
var wordsHeight = 80 + Game.wordsDOM.getBoundingClientRect().height;
|
if(Game.FORCE_TEXT_Y<0){
|
||||||
var currentY = parseFloat(Game.wordsDOM.style.top) || 80;
|
var wordsHeight = 80 + Game.wordsDOM.getBoundingClientRect().height;
|
||||||
var gotoY = (wordsHeight<250) ? 0 : wordsHeight-250;
|
var currentY = parseFloat(Game.wordsDOM.style.top) || 80;
|
||||||
gotoY = 80 - gotoY;
|
var gotoY = (wordsHeight<250) ? 0 : wordsHeight-250;
|
||||||
var nextY = instant ? gotoY : currentY*0.9 + gotoY*0.1;
|
gotoY = 80 - gotoY;
|
||||||
Game.wordsDOM.style.top = nextY+"px";
|
var nextY = instant ? gotoY : currentY*0.9 + gotoY*0.1;
|
||||||
|
Game.wordsDOM.style.top = nextY+"px";
|
||||||
|
}else{
|
||||||
|
Game.wordsDOM.style.top = Game.FORCE_TEXT_Y+"px";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// CLEAR TEXT
|
// CLEAR TEXT
|
||||||
|
|
|
@ -18,6 +18,12 @@ window.sfx = function(sound, options){
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
window.stopAllSounds = function(){
|
||||||
|
Object.keys(Library.sounds).forEach(function(name){
|
||||||
|
Library.sounds[name].stop();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
window.voice = function(name, options){
|
window.voice = function(name, options){
|
||||||
options = options || {};
|
options = options || {};
|
||||||
sfx("voice_"+name, options);
|
sfx("voice_"+name, options);
|
||||||
|
|
Loading…
Reference in New Issue