修复BUG

This commit is contained in:
kron
2025-09-18 09:28:14 +08:00
parent b952ea9fd0
commit 72ab9c3757
8 changed files with 96 additions and 34 deletions

View File

@@ -29,7 +29,6 @@ watch(
if (!sound.value) return;
if (currentRoundEnded.value) {
currentRound.value += 1;
console.log(11111, currentRound.value);
// 播放当前轮次语音
audioManager.play(
`${["一", "二", "三", "四", "五"][currentRound.value - 1]}`
@@ -38,10 +37,7 @@ watch(
// 延迟播放队伍提示音
setTimeout(
() => {
if (key) {
if (!yourTurn.value) audioManager.play(key);
else audioManager.play("轮到你了");
}
if (key && !yourTurn.value) audioManager.play(key);
currentRoundEnded.value = false;
yourTurn.value = false;
},
@@ -103,6 +99,7 @@ async function onReceiveMessage(messages = []) {
totalShot.value = 0;
audioManager.play("决金箭轮");
tips.value = "即将开始...";
currentRoundEnded.value = false;
} else if (msg.constructor === MESSAGETYPES.ShootSyncMePracticeID) {
ended.value = true;
} else if (msg.constructor === MESSAGETYPES.MatchOver) {