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:
@@ -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"]
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user