diff --git a/src/components/ShootProgress.vue b/src/components/ShootProgress.vue index 80ddecd..f2464f3 100644 --- a/src/components/ShootProgress.vue +++ b/src/components/ShootProgress.vue @@ -45,6 +45,7 @@ const currentSound = ref(""); const currentRound = ref(props.currentRound); const currentRoundEnded = ref(!props.battleId); const halfTimeTip = ref(false); +const ended = ref(false); watch( () => props.tips, @@ -128,7 +129,7 @@ const updateSound = () => { }; async function onReceiveMessage(messages = []) { - if (!sound.value) return; + if (!sound.value || ended.value) return; messages.forEach((msg) => { if ( (props.battleId && msg.constructor === MESSAGETYPES.ShootResult) || @@ -154,6 +155,10 @@ async function onReceiveMessage(messages = []) { audioManager.play("比赛结束"); } else if (msg.constructor === MESSAGETYPES.FinalShoot) { audioManager.play("决金箭轮"); + } else if (msg.constructor === MESSAGETYPES.ShootSyncMePracticeID) { + ended.value = true; + } else if (msg.constructor === MESSAGETYPES.MatchOver) { + ended.value = true; } }); }