update:新增语音优化

This commit is contained in:
2026-07-31 14:45:17 +08:00
parent cfdb169329
commit 3ab1ad59bd
6 changed files with 36 additions and 7 deletions
+4 -1
View File
@@ -154,7 +154,10 @@ async function onReceiveMessage(msg) {
} else if (msg.type === MESSAGETYPESV2.BattleEnd) {
setTimeout(() => onOver(msg), 1500);
} else if (msg.type === MESSAGETYPESV2.TestDistance && step.value === 3) {
if (msg.shootData.distance / 100 >= 5) {
const rawDistance = Number(msg.shootData?.distance);
if (rawDistance === 0) {
audioManager.play("未发现靶纸,请瞄准靶纸射箭");
} else if (rawDistance / 100 >= 5) {
audioManager.play("距离合格");
btnDisabled.value = false;
showGuide.value = true;