Catch result: show controller, hide continue button, auto-return to map after 3s
This commit is contained in:
1 parent
f5ae220da3
commit
ad6141bde0
1 file changed
+7
-3
@@ -1328,10 +1328,12 @@ class Game {
|
|||||||
SFX.pokeball();
|
SFX.pokeball();
|
||||||
|
|
||||||
this.show('catch-result');
|
this.show('catch-result');
|
||||||
this._showController(false);
|
this._showController(true);
|
||||||
|
|
||||||
const resultEmoji = document.getElementById('catch-result-emoji');
|
const resultEmoji = document.getElementById('catch-result-emoji');
|
||||||
const resultMsg = document.getElementById('catch-result-msg');
|
const resultMsg = document.getElementById('catch-result-msg');
|
||||||
|
const continueBtn = document.getElementById('btn-catch-continue');
|
||||||
|
if (continueBtn) continueBtn.style.display = 'none';
|
||||||
|
|
||||||
if (canCatch) {
|
if (canCatch) {
|
||||||
setTimeout(() => SFX.catch(), 500);
|
setTimeout(() => SFX.catch(), 500);
|
||||||
@@ -1358,10 +1360,12 @@ class Game {
|
|||||||
const wildWrap = document.getElementById('map-wild-wrap');
|
const wildWrap = document.getElementById('map-wild-wrap');
|
||||||
if (wildWrap) wildWrap.style.display = 'none';
|
if (wildWrap) wildWrap.style.display = 'none';
|
||||||
|
|
||||||
document.getElementById('btn-catch-continue').onclick = () => {
|
setTimeout(() => {
|
||||||
|
if (this.state.screen === 'catch-result') {
|
||||||
saveGame(this.state);
|
saveGame(this.state);
|
||||||
this.showMap();
|
this.showMap();
|
||||||
};
|
}
|
||||||
|
}, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
loadQuestions(cb) {
|
loadQuestions(cb) {
|
||||||
|
|||||||
Reference in new issue
Block a user