细节修改
This commit is contained in:
@@ -155,13 +155,15 @@ onLoad(async (options) => {
|
||||
if (battleInfo.startTime < 0) return;
|
||||
start.value = true;
|
||||
step.value = 3;
|
||||
tips.value = "请连续射出6支箭";
|
||||
players.value.forEach((p) => {
|
||||
playersScores.value[p.id] = p.arrows;
|
||||
if (p.id === user.value.id) {
|
||||
scores.value = p.arrows;
|
||||
}
|
||||
});
|
||||
tips.value = `${
|
||||
scores.value.length ? "下半场-" : "上半场-"
|
||||
}请连续射出6支箭`;
|
||||
const remain = Date.now() / 1000 - battleInfo.startTime;
|
||||
if (remain <= 90) {
|
||||
setTimeout(() => {
|
||||
@@ -346,11 +348,17 @@ async function onReceiveMessage(messages = []) {
|
||||
step.value = 3;
|
||||
seq.value += 1;
|
||||
timerSeq.value = 0;
|
||||
tips.value = "请连续射出6支箭";
|
||||
tips.value = `${
|
||||
scores.value.length ? "下半场-" : "上半场-"
|
||||
}请连续射出6支箭`;
|
||||
total.value = 90;
|
||||
halfTimeTip.value = false;
|
||||
}
|
||||
if (msg.constructor === MESSAGETYPES.ToSomeoneShoot) {
|
||||
if (!start.value) {
|
||||
start.value = true;
|
||||
step.value = 3;
|
||||
}
|
||||
if (battleType.value === 1) {
|
||||
if (currentShooterId.value !== msg.userId) {
|
||||
seq.value += 1;
|
||||
@@ -394,7 +402,7 @@ async function onReceiveMessage(messages = []) {
|
||||
});
|
||||
}
|
||||
}
|
||||
if (battleType.value === 2) {
|
||||
if (battleType.value === 2 && msg.userId === user.value.id) {
|
||||
scores.value.push(msg.target);
|
||||
power.value = msg.target.battery;
|
||||
}
|
||||
@@ -590,13 +598,13 @@ onUnmounted(() => {
|
||||
:currentShooterId="currentShooterId"
|
||||
/>
|
||||
<BowTarget
|
||||
:mode="battleType ? 'team' : 'solo'"
|
||||
:mode="battleType === 1 ? 'team' : 'solo'"
|
||||
:power="start ? power : 0"
|
||||
:currentRound="currentRound"
|
||||
:totalRound="totalRounds"
|
||||
:scores="scores"
|
||||
:blueScores="blueScores"
|
||||
:stop="halfTimeTip && !startCount"
|
||||
:stop="!startCount"
|
||||
/>
|
||||
<BattleFooter
|
||||
v-if="roundResults.length"
|
||||
|
||||
Reference in New Issue
Block a user