添加升级显示
This commit is contained in:
@@ -117,6 +117,7 @@ async function onReceiveMessage(messages = []) {
|
||||
// 这里会掉多次;
|
||||
timerSeq.value += 1;
|
||||
battleId.value = msg.id;
|
||||
startCount.value = true;
|
||||
players.value = [
|
||||
...msg.groupUserStatus.redTeam,
|
||||
...msg.groupUserStatus.blueTeam,
|
||||
@@ -130,7 +131,6 @@ async function onReceiveMessage(messages = []) {
|
||||
if (msg.id !== battleId.value) return;
|
||||
if (msg.constructor === MESSAGETYPES.MeleeAllReady) {
|
||||
start.value = true;
|
||||
startCount.value = true;
|
||||
seq.value += 1;
|
||||
timerSeq.value = 0;
|
||||
tips.value = "请连续射出6支箭";
|
||||
@@ -144,7 +144,7 @@ async function onReceiveMessage(messages = []) {
|
||||
playersScores.value[msg.userId].push(msg.target);
|
||||
}
|
||||
if (msg.constructor === MESSAGETYPES.HalfTimeOver) {
|
||||
playersScores.value = {};
|
||||
uni.$emit("update-ramain", 0);
|
||||
[...msg.groupUserStatus.redTeam, ...msg.groupUserStatus.blueTeam].forEach(
|
||||
(player) => {
|
||||
playersScores.value[player.id] = player.arrows;
|
||||
@@ -155,7 +155,7 @@ async function onReceiveMessage(messages = []) {
|
||||
tips.value = "准备下半场";
|
||||
}
|
||||
if (msg.constructor === MESSAGETYPES.MatchOver) {
|
||||
uni.setStorageSync("last-battle", msg.endStatus);
|
||||
uni.setStorageSync("last-battle", { ...msg.endStatus, lvl: msg.lvl });
|
||||
if (msg.endStatus.noSaved) {
|
||||
uni.showToast({
|
||||
title: "游戏结束",
|
||||
|
||||
Reference in New Issue
Block a user