细节优化

This commit is contained in:
kron
2025-06-15 20:55:34 +08:00
parent 448f88a77e
commit c2b2d0bf99
12 changed files with 52 additions and 14 deletions

View File

@@ -25,6 +25,7 @@ const totalRounds = ref(0);
const power = ref(0);
const scores = ref([]);
const tips = ref("即将开始...");
const seq = ref(0);
const timerSeq = ref(0);
const players = ref([]);
const playersScores = ref({});
@@ -83,13 +84,14 @@ async function onReceiveMessage(content) {
if (msg.constructor === MESSAGETYPES.MeleeAllReady) {
totalRounds.value = msg.groupUserStatus.config.maxRounds;
start.value = true;
seq.value += 1;
timerSeq.value = 0;
tips.value = "请在90秒内射完12支箭";
scores.value = [];
}
if (msg.constructor === MESSAGETYPES.ShootResult) {
if (msg.userId === user.value.id) {
scores.value = [msg.target];
scores.value.push(msg.target);
power.value = msg.target.battery;
}
playersScores.value[msg.userId].push(msg.target);
@@ -125,7 +127,7 @@ onUnmounted(() => {
<BowPower :power="45" />
</view>
</Guide>
<ShootProgress v-if="start" :start="start" :tips="tips" />
<ShootProgress v-if="start" :seq="seq" :start="start" :tips="tips" />
<BowTarget
:avatar="user.avatarUrl"
:power="power"