2025-11-16 14:23:26 +08:00
|
|
|
extends EntityBase
|
|
|
|
|
|
|
|
|
|
func register():
|
|
|
|
|
fields[FieldStore.Entity.MAX_HEALTH] = 120
|
|
|
|
|
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.2
|
|
|
|
|
fields[FieldStore.Entity.OFFSET_SHOOT] = 0
|
2026-05-10 23:00:47 +08:00
|
|
|
attackCooldownMap[0] = randi_range(1000, 3000)
|
2026-01-18 14:49:06 +08:00
|
|
|
func spawn():
|
|
|
|
|
texture.play("walk")
|
2025-11-16 14:23:26 +08:00
|
|
|
func ai():
|
2026-05-08 19:02:35 +08:00
|
|
|
PresetEntityAI.follow(self , currentFocusedBoss, 300)
|
2025-11-16 14:23:26 +08:00
|
|
|
tryAttack(0)
|
|
|
|
|
func attack(type):
|
|
|
|
|
if type == 0:
|
|
|
|
|
var weaponPos = findWeaponAnchor("normal")
|
|
|
|
|
var angle = weaponPos.angle_to_point(currentFocusedBoss.position)
|
2026-05-08 19:02:35 +08:00
|
|
|
BulletBase.generate(ComponentManager.getBullet("DogCircle"), self , weaponPos, angle)
|
2025-11-16 14:23:26 +08:00
|
|
|
return true
|