mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-12 06:37:13 +08:00
refactor: 替换PresetAIs为PresetBulletAI,优化子弹AI逻辑
This commit is contained in:
@@ -17,7 +17,7 @@ func spawn():
|
||||
texture.play("walk")
|
||||
|
||||
func ai():
|
||||
move(currentFocusedBoss.position - position)
|
||||
PresetEntityAI.follow(self, currentFocusedBoss, 0)
|
||||
if currentFocusedBoss.position.distance_to(position) < 200:
|
||||
tryAttack(2)
|
||||
elif currentFocusedBoss.position.distance_to(position) < 700:
|
||||
|
||||
@@ -8,7 +8,7 @@ func register():
|
||||
|
||||
func ai():
|
||||
attackCooldownMap[0] = randi_range(1500, 4000)
|
||||
move(currentFocusedBoss.position - position)
|
||||
PresetEntityAI.follow(self, currentFocusedBoss, 300)
|
||||
tryAttack(0)
|
||||
func attack(type):
|
||||
if type == 0:
|
||||
|
||||
Reference in New Issue
Block a user