From 783db22881a5dffc66594114eb7f9b88b008864c Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Sun, 28 Jul 2019 03:58:26 +0000 Subject: [PATCH] assets/scripts.js: Show choices on game-over screens, too --- assets/scripts.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/assets/scripts.js b/assets/scripts.js index 72e19cd..8ca5279 100644 --- a/assets/scripts.js +++ b/assets/scripts.js @@ -187,8 +187,7 @@ function addChoices(r) { function momentStart(m, seeked) { console.log('momentStart', m, seeked); - if (m.type == 'scene:cs_bs') { - addZones(currentSegment); + if (m.choices) { addChoices(m); } if (!seeked) @@ -197,7 +196,7 @@ function momentStart(m, seeked) { function momentUpdate(m, ms) { //console.log('momentUpdate', m); - if (m.type == 'scene:cs_bs') { + if (m.choices) { var p = 100 - Math.floor((ms - m.startMs) * 100 / (m.endMs - m.startMs)); document.getElementById("progress").style.width = p + '%'; } @@ -205,9 +204,7 @@ function momentUpdate(m, ms) { function momentEnd(m, seeked) { console.log('momentEnd', m, seeked); - if (m.type == 'scene:cs_bs') { - setNextSegment(null); - addZones(currentSegment); + if (m.choices) { addChoices(0); document.getElementById("progress").style.width = 0; }