大乱斗细节完善

This commit is contained in:
kron
2025-06-22 01:41:51 +08:00
parent 95fdef1986
commit 322f23efb4
5 changed files with 31 additions and 8 deletions

View File

@@ -12,12 +12,21 @@ defineProps({
type: Array,
default: () => [],
},
done: {
type: Boolean,
default: false,
},
});
const rowCount = new Array(6).fill(0);
</script>
<template>
<view class="container">
<image
:style="{ opacity: done ? 1 : 0 }"
src="../static/checked-green.png"
mode="widthFix"
/>
<image :src="avatar" mode="widthFix" />
<text>{{ name }}</text>
<view>
@@ -55,8 +64,16 @@ const rowCount = new Array(6).fill(0);
color: #fff9;
margin-right: 20px;
font-size: 14px;
position: relative;
}
.container > image:first-child {
.container > image:nth-child(1) {
position: absolute;
width: 15px;
height: 15px;
top: 30%;
left: 0;
}
.container > image:nth-child(2) {
width: 30px;
height: 30px;
min-height: 30px;
@@ -66,30 +83,30 @@ const rowCount = new Array(6).fill(0);
margin-left: -30px;
flex: 0 0 auto;
}
.container > text:nth-child(2) {
.container > text:nth-child(3) {
font-size: 14px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 20%;
}
.container > view:nth-child(3) {
.container > view:nth-child(4) {
display: flex;
flex-direction: column;
}
.container > view:nth-child(3) > view {
.container > view:nth-child(4) > view {
display: flex;
padding: 5px 0;
}
.container > view:nth-child(3) > view text {
.container > view:nth-child(4) > view text {
width: 34px;
text-align: center;
display: block;
}
.container > view:nth-child(3) > view:first-child {
.container > view:nth-child(4) > view:first-child {
border-bottom: 1px solid #fff3;
}
.container > text:nth-child(4) {
.container > text:nth-child(5) {
width: 40px;
text-align: right;
}

View File

@@ -345,6 +345,7 @@ onUnmounted(() => {
:name="player.name"
:avatar="player.avatar"
:scores="playersScores[player.id]"
:done="playersScores[player.id].length === 12"
/>
</view>
<Timer :seq="timerSeq" />

View File

@@ -105,6 +105,7 @@ onLoad(async (options) => {
:name="player.name"
:avatar="player.avatar"
:scores="player.arrowHistory"
:done="false"
/>
<view
v-for="(round, index) in roundsData"

View File

@@ -21,6 +21,7 @@ const gameType = ref(0);
const teamSize = ref(0);
const matching = ref(false);
const start = ref(false);
const startCount = ref(false);
const battleId = ref("");
const currentRound = ref(1);
const totalRounds = ref(0);
@@ -82,6 +83,7 @@ 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支箭";
@@ -95,6 +97,7 @@ async function onReceiveMessage(messages = []) {
playersScores.value[msg.userId].push(msg.target);
}
if (msg.constructor === MESSAGETYPES.HalfTimeOver) {
startCount.value = false;
halfTimeTip.value = true;
tips.value = "准备下半场";
}
@@ -129,7 +132,7 @@ onUnmounted(() => {
<BowPower :power="45" />
</view>
</Guide>
<ShootProgress v-if="start" :seq="seq" :start="start" :tips="tips" />
<ShootProgress v-if="start" :seq="seq" :start="startCount" :tips="tips" />
<view v-if="start" class="infos">
<Avatar :src="user.avatar" :size="35" />
<BowPower :power="power" />
@@ -148,6 +151,7 @@ onUnmounted(() => {
:name="player.name"
:avatar="player.avatar"
:scores="playersScores[player.id]"
:done="playersScores[player.id].length === 12"
/>
<Timer :seq="timerSeq" :callBack="readyToGo" />
<ScreenHint

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B