mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-28 22:49:24 +09:00
fix(drop-and-fusion): バブルゲームのリトライボタンでリトライができない問題を修正
ゲーム中なら諦める、ゲームオーバー画面の表示中はリスタートになるように
This commit is contained in:
parent
73165bf0ba
commit
96240f7334
@ -153,7 +153,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
</div>
|
</div>
|
||||||
<div :class="$style.frame">
|
<div :class="$style.frame">
|
||||||
<div :class="$style.frameInner">
|
<div :class="$style.frameInner">
|
||||||
<MkButton danger @click="surrender">Retry</MkButton>
|
<MkButton v-if="!isGameOver && !replaying" full danger @click="surrender">Surrender</MkButton>
|
||||||
|
<MkButton v-else full @click="retry">Retry</MkButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -483,15 +484,22 @@ async function surrender() {
|
|||||||
game.surrender();
|
game.surrender();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function retry() {
|
||||||
|
end();
|
||||||
|
await start();
|
||||||
|
}
|
||||||
|
|
||||||
function end() {
|
function end() {
|
||||||
game.dispose();
|
game.dispose();
|
||||||
isGameOver.value = false;
|
isGameOver.value = false;
|
||||||
|
replaying.value = false;
|
||||||
currentPick.value = null;
|
currentPick.value = null;
|
||||||
dropReady.value = true;
|
dropReady.value = true;
|
||||||
stock.value = [];
|
stock.value = [];
|
||||||
score.value = 0;
|
score.value = 0;
|
||||||
combo.value = 0;
|
combo.value = 0;
|
||||||
comboPrev.value = 0;
|
comboPrev.value = 0;
|
||||||
|
maxCombo.value = 0;
|
||||||
bgmNodes?.soundSource.stop();
|
bgmNodes?.soundSource.stop();
|
||||||
gameStarted.value = false;
|
gameStarted.value = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user