1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-03 09:51:53 +08:00

fix(Bullets): 将箭矢的生命周期从距离改为时间

修改Arrow.tscn中的lifeDistance为lifeTime,并同步更新Arrow.gd中的相关计算逻辑,以统一使用时间作为生命周期基准
This commit is contained in:
2026-01-31 13:21:49 +08:00
parent 82ae6b343a
commit 501e7cb48c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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"]
+1 -1
View File
@@ -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: