细节调整

This commit is contained in:
kron
2025-07-11 22:21:34 +08:00
parent 81c064ba8b
commit e0807eb06a
14 changed files with 98 additions and 57 deletions

View File

@@ -117,6 +117,10 @@ async function onReceiveMessage(messages = []) {
timerSeq.value = 0;
scores.value = [];
totalRounds.value = msg.groupUserStatus.config.maxRounds;
roundResults.value.push({
redArrows: [],
blueArrows: [],
});
}
if (msg.constructor === MESSAGETYPES.ToSomeoneShoot) {
if (currentShooterId.value !== msg.userId) {
@@ -149,11 +153,6 @@ async function onReceiveMessage(messages = []) {
msg.target
);
}
} else {
roundResults.value.push({
redArrows: isRed ? [msg.target] : [],
blueArrows: isRed ? [] : [msg.target],
});
}
}
if (msg.constructor === MESSAGETYPES.CurrentRoundEnded) {
@@ -167,7 +166,13 @@ async function onReceiveMessage(messages = []) {
redPoints.value += result.redScore;
// roundResults.value = result.roundResults;
currentRound.value = result.currentRound + 1;
if (result.currentRound < 5) showRoundTip.value = true;
if (result.currentRound < 5) {
roundResults.value.push({
redArrows: [],
blueArrows: [],
});
showRoundTip.value = true;
}
}
if (msg.constructor === MESSAGETYPES.FinalShoot) {
if (!isFinalShoot.value) {