Skip to content

Commit

Permalink
fix(drop-and-fusion): バブルゲームのリトライボタンでリトライができない問題を修正 (#12957)
Browse files Browse the repository at this point in the history
ゲーム中なら諦める、ゲームオーバー画面の表示中はリスタートになるように
  • Loading branch information
u1-liquid authored Jan 10, 2024
1 parent 6bae440 commit 138a248
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/frontend/src/pages/drop-and-fusion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 138a248

Please sign in to comment.