大乱斗细节完善
This commit is contained in:
@@ -12,12 +12,21 @@ defineProps({
|
|||||||
type: Array,
|
type: Array,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
|
done: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const rowCount = new Array(6).fill(0);
|
const rowCount = new Array(6).fill(0);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
|
<image
|
||||||
|
:style="{ opacity: done ? 1 : 0 }"
|
||||||
|
src="../static/checked-green.png"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
<image :src="avatar" mode="widthFix" />
|
<image :src="avatar" mode="widthFix" />
|
||||||
<text>{{ name }}</text>
|
<text>{{ name }}</text>
|
||||||
<view>
|
<view>
|
||||||
@@ -55,8 +64,16 @@ const rowCount = new Array(6).fill(0);
|
|||||||
color: #fff9;
|
color: #fff9;
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
font-size: 14px;
|
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;
|
width: 30px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
min-height: 30px;
|
min-height: 30px;
|
||||||
@@ -66,30 +83,30 @@ const rowCount = new Array(6).fill(0);
|
|||||||
margin-left: -30px;
|
margin-left: -30px;
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
}
|
}
|
||||||
.container > text:nth-child(2) {
|
.container > text:nth-child(3) {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
width: 20%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
.container > view:nth-child(3) {
|
.container > view:nth-child(4) {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
.container > view:nth-child(3) > view {
|
.container > view:nth-child(4) > view {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
}
|
}
|
||||||
.container > view:nth-child(3) > view text {
|
.container > view:nth-child(4) > view text {
|
||||||
width: 34px;
|
width: 34px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
.container > view:nth-child(3) > view:first-child {
|
.container > view:nth-child(4) > view:first-child {
|
||||||
border-bottom: 1px solid #fff3;
|
border-bottom: 1px solid #fff3;
|
||||||
}
|
}
|
||||||
.container > text:nth-child(4) {
|
.container > text:nth-child(5) {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -345,6 +345,7 @@ onUnmounted(() => {
|
|||||||
:name="player.name"
|
:name="player.name"
|
||||||
:avatar="player.avatar"
|
:avatar="player.avatar"
|
||||||
:scores="playersScores[player.id]"
|
:scores="playersScores[player.id]"
|
||||||
|
:done="playersScores[player.id].length === 12"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<Timer :seq="timerSeq" />
|
<Timer :seq="timerSeq" />
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ onLoad(async (options) => {
|
|||||||
:name="player.name"
|
:name="player.name"
|
||||||
:avatar="player.avatar"
|
:avatar="player.avatar"
|
||||||
:scores="player.arrowHistory"
|
:scores="player.arrowHistory"
|
||||||
|
:done="false"
|
||||||
/>
|
/>
|
||||||
<view
|
<view
|
||||||
v-for="(round, index) in roundsData"
|
v-for="(round, index) in roundsData"
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ const gameType = ref(0);
|
|||||||
const teamSize = ref(0);
|
const teamSize = ref(0);
|
||||||
const matching = ref(false);
|
const matching = ref(false);
|
||||||
const start = ref(false);
|
const start = ref(false);
|
||||||
|
const startCount = ref(false);
|
||||||
const battleId = ref("");
|
const battleId = ref("");
|
||||||
const currentRound = ref(1);
|
const currentRound = ref(1);
|
||||||
const totalRounds = ref(0);
|
const totalRounds = ref(0);
|
||||||
@@ -82,6 +83,7 @@ async function onReceiveMessage(messages = []) {
|
|||||||
if (msg.id !== battleId.value) return;
|
if (msg.id !== battleId.value) return;
|
||||||
if (msg.constructor === MESSAGETYPES.MeleeAllReady) {
|
if (msg.constructor === MESSAGETYPES.MeleeAllReady) {
|
||||||
start.value = true;
|
start.value = true;
|
||||||
|
startCount.value = true;
|
||||||
seq.value += 1;
|
seq.value += 1;
|
||||||
timerSeq.value = 0;
|
timerSeq.value = 0;
|
||||||
tips.value = "请连续射出6支箭";
|
tips.value = "请连续射出6支箭";
|
||||||
@@ -95,6 +97,7 @@ async function onReceiveMessage(messages = []) {
|
|||||||
playersScores.value[msg.userId].push(msg.target);
|
playersScores.value[msg.userId].push(msg.target);
|
||||||
}
|
}
|
||||||
if (msg.constructor === MESSAGETYPES.HalfTimeOver) {
|
if (msg.constructor === MESSAGETYPES.HalfTimeOver) {
|
||||||
|
startCount.value = false;
|
||||||
halfTimeTip.value = true;
|
halfTimeTip.value = true;
|
||||||
tips.value = "准备下半场";
|
tips.value = "准备下半场";
|
||||||
}
|
}
|
||||||
@@ -129,7 +132,7 @@ onUnmounted(() => {
|
|||||||
<BowPower :power="45" />
|
<BowPower :power="45" />
|
||||||
</view>
|
</view>
|
||||||
</Guide>
|
</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">
|
<view v-if="start" class="infos">
|
||||||
<Avatar :src="user.avatar" :size="35" />
|
<Avatar :src="user.avatar" :size="35" />
|
||||||
<BowPower :power="power" />
|
<BowPower :power="power" />
|
||||||
@@ -148,6 +151,7 @@ onUnmounted(() => {
|
|||||||
:name="player.name"
|
:name="player.name"
|
||||||
:avatar="player.avatar"
|
:avatar="player.avatar"
|
||||||
:scores="playersScores[player.id]"
|
:scores="playersScores[player.id]"
|
||||||
|
:done="playersScores[player.id].length === 12"
|
||||||
/>
|
/>
|
||||||
<Timer :seq="timerSeq" :callBack="readyToGo" />
|
<Timer :seq="timerSeq" :callBack="readyToGo" />
|
||||||
<ScreenHint
|
<ScreenHint
|
||||||
|
|||||||
BIN
src/static/checked-green.png
Normal file
BIN
src/static/checked-green.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 396 B |
Reference in New Issue
Block a user