细节完善
This commit is contained in:
@@ -64,6 +64,9 @@ onLoad(async (options) => {
|
||||
players.value = [...battleInfo.blueTeam, ...battleInfo.redTeam];
|
||||
players.value.forEach((p) => {
|
||||
playersScores.value[p.id] = p.arrows;
|
||||
if (p.id === user.value.id) {
|
||||
scores.value = p.arrows;
|
||||
}
|
||||
});
|
||||
if (battleInfo.startTime) {
|
||||
const remain = Date.now() / 1000 - battleInfo.startTime;
|
||||
@@ -72,7 +75,6 @@ onLoad(async (options) => {
|
||||
uni.$emit("update-ramain", remain);
|
||||
}, 300);
|
||||
} else if (remain > 90 && remain <= 110) {
|
||||
halfTimeTip.value = true;
|
||||
startCount.value = false;
|
||||
tips.value = "准备下半场";
|
||||
} else if (remain > 110) {
|
||||
@@ -123,6 +125,7 @@ async function onReceiveMessage(messages = []) {
|
||||
players.value.forEach((p) => {
|
||||
playersScores.value[p.id] = [];
|
||||
});
|
||||
uni.$hideHint();
|
||||
};
|
||||
}
|
||||
if (msg.id !== battleId.value) return;
|
||||
@@ -132,7 +135,7 @@ async function onReceiveMessage(messages = []) {
|
||||
seq.value += 1;
|
||||
timerSeq.value = 0;
|
||||
tips.value = "请连续射出6支箭";
|
||||
scores.value = [];
|
||||
halfTimeTip.value = false;
|
||||
}
|
||||
if (msg.constructor === MESSAGETYPES.ShootResult) {
|
||||
if (msg.userId === user.value.id) {
|
||||
|
||||
Reference in New Issue
Block a user