From b0a4c7bea58e57839427faa2fe57e626589b2f1a Mon Sep 17 00:00:00 2001 From: kron Date: Sat, 8 Nov 2025 11:33:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=BD=AE=E5=88=B0=E4=BD=A0?= =?UTF-8?q?=E4=BA=86=E5=A3=B0=E9=9F=B3=E6=92=AD=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/HeaderProgress.vue | 8 ++------ src/components/ShootProgress2.vue | 10 ++++++++-- src/pages/team-battle.vue | 33 +++++++------------------------ 3 files changed, 17 insertions(+), 34 deletions(-) diff --git a/src/components/HeaderProgress.vue b/src/components/HeaderProgress.vue index 0686f9d..551b0df 100644 --- a/src/components/HeaderProgress.vue +++ b/src/components/HeaderProgress.vue @@ -18,7 +18,6 @@ const ended = ref(false); const halfTime = ref(false); const currentShot = ref(0); const totalShot = ref(0); -const yourTurn = ref(false); watch( () => tips.value, @@ -37,9 +36,8 @@ watch( // 延迟播放队伍提示音 setTimeout( () => { - if (key && !yourTurn.value) audioManager.play(key); + if (key) audioManager.play(newVal.includes("你") ? "轮到你了" : key); currentRoundEnded.value = false; - yourTurn.value = false; }, currentRoundEnded.value ? 1000 : 0 ); @@ -81,8 +79,6 @@ async function onReceiveMessage(messages = []) { : "未上靶"; audioManager.play(currentSound.value); } - } else if (msg.constructor === MESSAGETYPES.ToSomeoneShoot) { - yourTurn.value = user.value.id === msg.userId; } else if (msg.constructor === MESSAGETYPES.InvalidShot) { if (msg.userId === user.value.id) { uni.showToast({ @@ -159,7 +155,7 @@ onBeforeUnmount(() => {