diff --git a/src/components/BowData.vue b/src/components/BowData.vue index 6d9aae5..a791499 100644 --- a/src/components/BowData.vue +++ b/src/components/BowData.vue @@ -56,7 +56,7 @@ const props = defineProps({ :completeEffect="false" :rowCount="arrows.length === 12 ? 6 : 9" :total="total" - :scores="arrows.map((a) => a.ring)" + :arrows="arrows" :margin="arrows.length === 12 ? 4 : 1" :fontSize="arrows.length === 12 ? 25 : 22" /> diff --git a/src/components/BowTarget.vue b/src/components/BowTarget.vue index 63611f7..b1e6c5c 100644 --- a/src/components/BowTarget.vue +++ b/src/components/BowTarget.vue @@ -92,8 +92,10 @@ const simulShoot = async () => { if (device.value.deviceId) await simulShootAPI(device.value.deviceId); }; const simulShoot2 = async () => { - if (device.value.deviceId) - await simulShootAPI(device.value.deviceId, 0.01, 0.01); + if (device.value.deviceId) { + const r1 = Math.random() > 0.5 ? 0.01 : 0.02; + await simulShootAPI(device.value.deviceId, r1, r1); + } }; const env = computed(() => { diff --git a/src/components/HeaderProgress.vue b/src/components/HeaderProgress.vue index 9a97065..415678d 100644 --- a/src/components/HeaderProgress.vue +++ b/src/components/HeaderProgress.vue @@ -69,7 +69,7 @@ async function onReceiveMessage(message) { ? `${shootData.ringX ? "X" : shootData.ring}环` : "未上靶" ); - if (!shootData.ring) + if (shootData.angle !== null) key.push(`向${getDirectionText(shootData.angle)}调整`); audioManager.play(key, false); } diff --git a/src/components/ScorePanel.vue b/src/components/ScorePanel.vue index 363ec05..9948199 100644 --- a/src/components/ScorePanel.vue +++ b/src/components/ScorePanel.vue @@ -9,7 +9,7 @@ const props = defineProps({ type: Number, default: 0, }, - scores: { + arrows: { type: Array, default: () => [], }, @@ -51,7 +51,7 @@ onBeforeUnmount(() => {