细节完善
This commit is contained in:
@@ -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("射击无效");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user