Advance from result screen on any tap/click anywhere, not just CONTINUE button
This commit is contained in:
1 parent
2d6b967a29
commit
9e2f698616
1 file changed
+5
-1
@@ -1351,13 +1351,17 @@ class Game {
|
||||
}
|
||||
document.getElementById('result-explanation').textContent=q.explanation;
|
||||
|
||||
document.getElementById('btn-result-cont').onclick=()=>{
|
||||
const contBtn = document.getElementById('btn-result-cont');
|
||||
const doNext = () => {
|
||||
this.state.currentQ++;
|
||||
saveGame(this.state);
|
||||
if(this.state.currentQ>=this.state.questions.length){ clearSave(); this.showComplete(); }
|
||||
else if(MILESTONES[this.state.currentQ]) this.showLevelUp();
|
||||
else this.showMap();
|
||||
};
|
||||
contBtn.onclick = doNext;
|
||||
const resultScreen = document.getElementById('screen-result');
|
||||
resultScreen.addEventListener('pointerdown', doNext, { once: true });
|
||||
}
|
||||
|
||||
/* ── LEVEL UP ─────────────────────────────────────────── */
|
||||
|
||||
Reference in new issue
Block a user