Play result audio after finishing cutscene ends

This commit is contained in:
2026-10-15 00:14:17 +09:00
parent 32d32a6ebc
commit 013807c873
3 changed files with 25 additions and 1 deletions
+1
View File
@@ -62,6 +62,7 @@ export function createFinishCutscene(onDismiss: () => void, appearances?: [Fight
reducedMotion.addEventListener('change', advance);
return {
get active() { return !!dialog; },
update(state: LocalMatchState) {
const reveal = state.reveal;
if (activeMatch && activeMatch !== state.matchId) close(true);
+1 -1
View File
@@ -130,7 +130,7 @@ export function createMatchView(container: HTMLElement, onAction: (action: Actio
const f = s.finished;
el('.finish-reason').hidden = f.reason === 'hit';
const outcome = s.aborted ? 'aborted' : f.winnerIndex === null ? 'draw' : f.winnerIndex === s.selfIndex ? 'win' : 'loss';
if (outcome !== 'aborted') sound.play(outcome, `${s.matchId}:result`);
if (outcome !== 'aborted' && !cutscene.active) sound.play(outcome, `${s.matchId}:result`);
container.dataset.outcome = outcome;
arena.dataset.result = outcome;
el('.result-banner h2').textContent = ({ win: '승리!', loss: '패배', draw: '무승부', aborted: '대전 중단' })[outcome];