1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-27 22:38:30 +09:00

fix(drop-and-fusion): バブルゲームのリトライボタンでリトライができない問題を修正 (#12957)

ゲーム中なら諦める、ゲームオーバー画面の表示中はリスタートになるように
This commit is contained in:
まっちゃとーにゅ 2024-01-10 10:40:09 +09:00 committed by GitHub
parent 6bae440f39
commit 138a248a6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -153,7 +153,8 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
<div :class="$style.frame">
<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>
@ -483,15 +484,22 @@ async function surrender() {
game.surrender();
}
async function retry() {
end();
await start();
}
function end() {
game.dispose();
isGameOver.value = false;
replaying.value = false;
currentPick.value = null;
dropReady.value = true;
stock.value = [];
score.value = 0;
combo.value = 0;
comboPrev.value = 0;
maxCombo.value = 0;
bgmNodes?.soundSource.stop();
gameStarted.value = false;
}