mirror of
https://github.com/mehotkhan/BandersnatchInteractive.git
synced 2025-07-27 17:23:22 +00:00
assets/scripts.js: Show choices on game-over screens, too
This commit is contained in:
parent
ab29b0e5c8
commit
783db22881
1 changed files with 3 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue