细节优化
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user