From 501e7cb48cfcb472e0b8d15b0b09b212a1e049ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=A8=E8=90=BD=E5=9F=BA=E5=9B=B4=E8=99=BE?= <3161880837@qq.com> Date: Sat, 31 Jan 2026 13:21:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(Bullets):=20=E5=B0=86=E7=AE=AD=E7=9F=A2?= =?UTF-8?q?=E7=9A=84=E7=94=9F=E5=91=BD=E5=91=A8=E6=9C=9F=E4=BB=8E=E8=B7=9D?= =?UTF-8?q?=E7=A6=BB=E6=94=B9=E4=B8=BA=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改Arrow.tscn中的lifeDistance为lifeTime,并同步更新Arrow.gd中的相关计算逻辑,以统一使用时间作为生命周期基准 --- components/Bullets/Arrow.tscn | 2 +- scripts/Contents/Bullets/Arrow.gd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Bullets/Arrow.tscn b/components/Bullets/Arrow.tscn index 839e7db..e254b23 100644 --- a/components/Bullets/Arrow.tscn +++ b/components/Bullets/Arrow.tscn @@ -134,7 +134,7 @@ script = ExtResource("2_qddg0") displayName = "鸡毛箭" speed = 50.0 penerate = 1.0 -lifeDistance = 2000.0 +lifeTime = 2000.0 autoSpawnAnimation = true [node name="animator" parent="texture" index="0"] diff --git a/scripts/Contents/Bullets/Arrow.gd b/scripts/Contents/Bullets/Arrow.gd index 3c3642e..61c81e8 100644 --- a/scripts/Contents/Bullets/Arrow.gd +++ b/scripts/Contents/Bullets/Arrow.gd @@ -18,7 +18,7 @@ func ai(): else: trail.emitting = true hitbox.disabled = false - speed = (1 - lifeDistancePercent()) * initialSpeed + speed = (1 - lifeTimePercent()) * initialSpeed baseDamage = speed * atk PresetBulletAI.forward(self, rotation) if speed < 1: