mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 15:01:53 +08:00
refactor(追踪系统): 统一使用getTrackingAnchor方法获取追踪目标位置
修改多个子弹脚本和EntityBase,使用统一的getTrackingAnchor方法获取追踪目标位置 在BulletBase中增加目标有效性检查 调整Wave配置和Rooster武器顺序
This commit is contained in:
@@ -9,4 +9,4 @@ func ai():
|
||||
canDamageSelf = !(timeLived() >= traceTime)
|
||||
PresetAIs.forward(self, rotation)
|
||||
if timeLived() < traceTime:
|
||||
PresetAIs.trace(self, launcher.currentFocusedBoss.position, 0.05)
|
||||
PresetAIs.trace(self, launcher.currentFocusedBoss.getTrackingAnchor(), 0.05)
|
||||
|
||||
@@ -11,7 +11,7 @@ func ai():
|
||||
speed *= 1.05
|
||||
speed = clamp(speed, 0, 20)
|
||||
if is_instance_valid(tracer) and timeLived() < maxTraceTime:
|
||||
PresetAIs.trace(self, tracer.position, clamp(speed / 50 * tracePower, 0, 1))
|
||||
PresetAIs.trace(self, tracer.getTrackingAnchor(), clamp(speed / 50 * tracePower, 0, 1))
|
||||
PresetAIs.forward(self, rotation)
|
||||
func destroy(_b):
|
||||
EffectController.create(preload("res://components/Effects/LGBTBoom.tscn"), position).shot()
|
||||
|
||||
@@ -15,4 +15,4 @@ func ai():
|
||||
else:
|
||||
forwarded = true
|
||||
if is_instance_valid(tracer):
|
||||
rotation = position.angle_to_point(tracer.position)
|
||||
rotation = position.angle_to_point(tracer.getTrackingAnchor())
|
||||
|
||||
Reference in New Issue
Block a user