细节完善

This commit is contained in:
kron
2026-02-10 14:48:07 +08:00
parent b0bf1880e4
commit 88f1ef5d95
8 changed files with 31 additions and 22 deletions

View File

@@ -55,11 +55,9 @@ async function onReceiveMessage(message) {
totalShot.value = mode === 1 ? 3 : 2;
currentRoundEnded.value = true;
audioManager.play("比赛开始");
}
if (type === MESSAGETYPESV2.BattleEnd) {
} else if (type === MESSAGETYPESV2.BattleEnd) {
audioManager.play("比赛结束");
}
if (type === MESSAGETYPESV2.ShootResult) {
} else if (type === MESSAGETYPESV2.ShootResult) {
if (melee.value && current.playerId !== user.value.id) return;
if (current.playerId === user.value.id) currentShot.value++;
if (message.shootData) {
@@ -73,11 +71,16 @@ async function onReceiveMessage(message) {
key.push(`${getDirectionText(shootData.angle)}调整`);
audioManager.play(key, false);
}
}
if (type === MESSAGETYPESV2.NewRound) {
} else if (type === MESSAGETYPESV2.NewRound) {
currentShot.value = 0;
currentRound.value = current.round;
currentRoundEnded.value = true;
} else if (type === MESSAGETYPESV2.InvalidShot) {
uni.showToast({
title: "距离不足,无效",
icon: "none",
});
audioManager.pLay("射击无效");
}
}