添加轮数的声音

This commit is contained in:
kron
2025-11-13 21:04:48 +08:00
parent 66705ae9b1
commit bd01b179a6
3 changed files with 36 additions and 12 deletions

View File

@@ -168,14 +168,16 @@ async function onReceiveMessage(messages = []) {
return;
}
if (wait.value !== msg.wait) {
wait.value = msg.wait;
if (msg.wait === 20) {
halfTime.value = true;
audioManager.play("中场休息");
}
if (msg.wait === 0) {
halfTime.value = false;
}
setTimeout(() => {
wait.value = msg.wait;
if (msg.wait === 20) {
halfTime.value = true;
audioManager.play("中场休息");
}
if (msg.wait === 0) {
halfTime.value = false;
}
}, 500);
}
} else if (msg.constructor === MESSAGETYPES.MatchOver) {
audioManager.play("比赛结束");