This commit is contained in:
syuilo 2024-01-09 20:09:47 +09:00
parent 333fac00c8
commit eda727c487
4 changed files with 13 additions and 6 deletions

2
locales/index.d.ts vendored
View file

@ -1195,6 +1195,8 @@ export interface Locale {
"bubbleGame": string; "bubbleGame": string;
"sfx": string; "sfx": string;
"soundWillBePlayed": string; "soundWillBePlayed": string;
"replay": string;
"replaying": string;
"_announcement": { "_announcement": {
"forExistingUsers": string; "forExistingUsers": string;
"forExistingUsersDescription": string; "forExistingUsersDescription": string;

View file

@ -1192,6 +1192,8 @@ enableQuickAddMfmFunction: "高度なMFMのピッカーを表示する"
bubbleGame: "バブルゲーム" bubbleGame: "バブルゲーム"
sfx: "効果音" sfx: "効果音"
soundWillBePlayed: "サウンドが再生されます" soundWillBePlayed: "サウンドが再生されます"
replay: "リプレイ"
replaying: "リプレイ中"
_announcement: _announcement:
forExistingUsers: "既存ユーザーのみ" forExistingUsers: "既存ユーザーのみ"

View file

@ -97,13 +97,13 @@ SPDX-License-Identifier: AGPL-3.0-only
<div>SCORE: <MkNumber :value="score"/></div> <div>SCORE: <MkNumber :value="score"/></div>
<div>MAX CHAIN: <MkNumber :value="maxCombo"/></div> <div>MAX CHAIN: <MkNumber :value="maxCombo"/></div>
<div class="_buttonsCenter"> <div class="_buttonsCenter">
<MkButton primary rounded @click="restart">Restart</MkButton> <MkButton primary rounded @click="restart">{{ i18n.ts.ok }}</MkButton>
<MkButton primary rounded @click="replay">Replay</MkButton> <MkButton primary rounded @click="replay">{{ i18n.ts.replay }}</MkButton>
<MkButton primary rounded @click="share">Share</MkButton> <MkButton primary rounded @click="share">{{ i18n.ts.share }}</MkButton>
</div> </div>
</div> </div>
</div> </div>
<div v-if="replaying" :class="$style.replayIndicator"><span :class="$style.replayIndicatorText"><i class="ti ti-player-play"></i> REPLAYING</span></div> <div v-if="replaying" :class="$style.replayIndicator"><span :class="$style.replayIndicatorText"><i class="ti ti-player-play"></i> {{ i18n.ts.replaying }}</span></div>
</div> </div>
<div v-if="replaying" style="display: flex;"> <div v-if="replaying" style="display: flex;">
<div :class="$style.frame" style="flex: 1; margin-right: 10px;"> <div :class="$style.frame" style="flex: 1; margin-right: 10px;">
@ -573,7 +573,10 @@ function attachGameEvents() {
}); });
game.addListener('gameOver', () => { game.addListener('gameOver', () => {
if (replaying.value) return; if (replaying.value) {
endReplay();
return;
}
logs = game.getLogs(); logs = game.getLogs();
currentPick.value = null; currentPick.value = null;

View file

@ -408,7 +408,7 @@ export class DropAndFusionGame extends EventEmitter<{
Matter.Engine.update(this.engine, this.TICK_DELTA); Matter.Engine.update(this.engine, this.TICK_DELTA);
window.requestAnimationFrame(playTick); this.tickRaf = window.requestAnimationFrame(playTick);
}; };
playTick(); playTick();