update:优化新手教程

This commit is contained in:
2026-08-27 17:24:25 +08:00
parent b9bbaba77f
commit 469487ba73
12 changed files with 106 additions and 14 deletions
+13 -2
View File
@@ -55,6 +55,10 @@ const props = defineProps({
type: Boolean,
default: false,
},
targetType: {
type: [Number, String],
default: 20,
},
targetRadius: {
type: Number,
default: 20,
@@ -422,12 +426,19 @@ function getExperienceTipStyle(shot) {
);
}
const simulShoot = async () => {
if (device.value.deviceId) await simulShootAPI(device.value.deviceId);
if (device.value.deviceId) {
await simulShootAPI(
device.value.deviceId,
undefined,
undefined,
props.targetType
);
}
};
const simulShoot2 = async () => {
if (device.value.deviceId) {
const r1 = Math.random() > 0.5 ? 0.01 : 0.02;
await simulShootAPI(device.value.deviceId, r1, r1);
await simulShootAPI(device.value.deviceId, r1, r1, props.targetType);
}
};
@@ -24,6 +24,10 @@ const props = defineProps({
type: Number,
default: 15,
},
targetType: {
type: [Number, String],
default: 20,
},
});
const arrow = ref({});
const distance = ref(0);
@@ -63,7 +67,14 @@ async function onReceiveMessage(msg) {
}
const simulShoot = async () => {
if (device.value.deviceId) await simulShootAPI(device.value.deviceId);
if (device.value.deviceId) {
await simulShootAPI(
device.value.deviceId,
undefined,
undefined,
props.targetType
);
}
};
onMounted(() => {