diff --git a/index.html b/index.html index b2c2d51..152b22e 100644 --- a/index.html +++ b/index.html @@ -22,6 +22,10 @@
play!
+
+
+
play!
+
diff --git a/scenes/act1-end.md b/scenes/act1-end.md index 4937e29..4b78b4b 100644 --- a/scenes/act1-end.md +++ b/scenes/act1-end.md @@ -2,11 +2,20 @@ `SceneSetup.act1_end()` +(...2000) + 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")` diff --git a/scripts/act1/Act1_Outro_BG.js b/scripts/act1/Act1_Outro_BG.js index 95530b5..9cd3184 100644 --- a/scripts/act1/Act1_Outro_BG.js +++ b/scripts/act1/Act1_Outro_BG.js @@ -189,7 +189,7 @@ function BG_Act1_Outro(){ } // NEXT SCENE? - if(frameTicker>=270/30){ + if(frameTicker>=320/30){ Game.goto("act1_end"); } diff --git a/scripts/act1/Act1_SceneSetup.js b/scripts/act1/Act1_SceneSetup.js index 2334f64..877b8a4 100644 --- a/scripts/act1/Act1_SceneSetup.js +++ b/scripts/act1/Act1_SceneSetup.js @@ -39,5 +39,11 @@ SceneSetup.act1_end = function(){ Game.resetScene(); music(null); + stopAllSounds(); + + // HACK + Game.FORCE_TEXT_Y = 52; + $("#game_container").style.background = "#000"; + $("#game_choices").style.display = "none"; }; \ No newline at end of file diff --git a/scripts/game/Game.js b/scripts/game/Game.js index e1e20ad..4d5f5bb 100644 --- a/scripts/game/Game.js +++ b/scripts/game/Game.js @@ -226,13 +226,18 @@ Game.immediatePromise = function(){ }; // Move the text DOM to latest +Game.FORCE_TEXT_Y = -1; Game.updateText = function(instant){ - var wordsHeight = 80 + Game.wordsDOM.getBoundingClientRect().height; - var currentY = parseFloat(Game.wordsDOM.style.top) || 80; - var gotoY = (wordsHeight<250) ? 0 : wordsHeight-250; - gotoY = 80 - gotoY; - var nextY = instant ? gotoY : currentY*0.9 + gotoY*0.1; - Game.wordsDOM.style.top = nextY+"px"; + if(Game.FORCE_TEXT_Y<0){ + var wordsHeight = 80 + Game.wordsDOM.getBoundingClientRect().height; + var currentY = parseFloat(Game.wordsDOM.style.top) || 80; + var gotoY = (wordsHeight<250) ? 0 : wordsHeight-250; + gotoY = 80 - gotoY; + 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 diff --git a/scripts/game/Sounds.js b/scripts/game/Sounds.js index f8b897e..398f418 100644 --- a/scripts/game/Sounds.js +++ b/scripts/game/Sounds.js @@ -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){ options = options || {}; sfx("voice_"+name, options);