细节调整

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

@@ -225,6 +225,10 @@ async function onReceiveMessage(messages = []) {
tips.value = "请在90秒内射完12支箭";
seq.value += 1;
}
roundResults.value.push({
redArrows: [],
blueArrows: [],
});
}
if (msg.constructor === MESSAGETYPES.MeleeAllReady) {
start.value = true;
@@ -273,11 +277,6 @@ async function onReceiveMessage(messages = []) {
msg.target
);
}
} else {
roundResults.value.push({
redArrows: isRed ? [msg.target] : [],
blueArrows: isRed ? [] : [msg.target],
});
}
}
if (room.value.battleType === 2) {
@@ -299,7 +298,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) {
@@ -378,13 +383,19 @@ onUnmounted(() => {
<image src="../static/1v1-bg.png" mode="widthFix" />
<view>
<view class="player" :style="{ transform: 'translateY(-60px)' }">
<image :src="owner.avatar" mode="widthFix" />
<image
:src="owner.avatar || '../static/user-icon.png'"
mode="widthFix"
/>
<text>{{ owner.name }}</text>
</view>
<image src="../static/versus.png" mode="widthFix" />
<block v-if="opponent.id">
<view class="player" :style="{ transform: 'translateY(60px)' }">
<image :src="opponent.avatar" mode="widthFix" />
<image
:src="opponent.avatar || '../static/user-icon.png'"
mode="widthFix"
/>
<text v-if="opponent.name">{{ opponent.name }}</text>
</view>
</block>