细节完善
This commit is contained in:
@@ -17,7 +17,7 @@ const props = defineProps({
|
||||
},
|
||||
total: {
|
||||
type: Number,
|
||||
default: 90,
|
||||
default: 120,
|
||||
},
|
||||
seq: {
|
||||
type: Number,
|
||||
@@ -25,7 +25,7 @@ const props = defineProps({
|
||||
},
|
||||
currentRound: {
|
||||
type: Number,
|
||||
default: 90,
|
||||
default: 0,
|
||||
},
|
||||
battleId: {
|
||||
type: String,
|
||||
@@ -45,6 +45,7 @@ const currentSound = ref("");
|
||||
const currentRound = ref(props.currentRound);
|
||||
const currentRoundEnded = ref(!props.battleId);
|
||||
const ended = ref(false);
|
||||
const halfTime = ref(false);
|
||||
|
||||
watch(
|
||||
() => props.tips,
|
||||
@@ -133,7 +134,7 @@ async function onReceiveMessage(messages = []) {
|
||||
(!props.battleId && msg.constructor === MESSAGETYPES.ShootSyncMeArrowID)
|
||||
) {
|
||||
if (props.melee && msg.userId !== user.value.id) return;
|
||||
if (msg.target) {
|
||||
if (!halfTime.value && msg.target) {
|
||||
currentSound.value = msg.target.ring
|
||||
? `${msg.target.ring}环`
|
||||
: "未上靶";
|
||||
@@ -142,10 +143,12 @@ async function onReceiveMessage(messages = []) {
|
||||
} else if (msg.constructor === MESSAGETYPES.AllReady) {
|
||||
audioManager.play("比赛开始");
|
||||
} else if (msg.constructor === MESSAGETYPES.MeleeAllReady) {
|
||||
halfTime.value = false;
|
||||
audioManager.play("比赛开始");
|
||||
} else if (msg.constructor === MESSAGETYPES.CurrentRoundEnded) {
|
||||
currentRoundEnded.value = true;
|
||||
} else if (msg.constructor === MESSAGETYPES.HalfTimeOver) {
|
||||
halfTime.value = true;
|
||||
audioManager.play("中场休息");
|
||||
} else if (msg.constructor === MESSAGETYPES.MatchOver) {
|
||||
audioManager.play("比赛结束");
|
||||
|
||||
Reference in New Issue
Block a user