2025-08-27 13:05:20 +08:00
|
|
|
extends EntityBase
|
2025-09-07 09:25:51 +08:00
|
|
|
class_name Bear # 攻击方式模仿泰拉瑞亚光之女皇
|
|
|
|
|
|
2025-09-07 09:48:03 +08:00
|
|
|
func register():
|
|
|
|
|
fields[FieldStore.Entity.MAX_HEALTH] = 2000
|
|
|
|
|
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.25
|
|
|
|
|
attackCooldownMap[0] = 100
|
|
|
|
|
func spawn():
|
|
|
|
|
texture.play("walk")
|
2025-09-07 09:25:51 +08:00
|
|
|
func ai():
|
2025-09-07 09:48:03 +08:00
|
|
|
PresetEntityAI.follow(self, currentFocusedBoss, 0)
|
|
|
|
|
tryAttack(0)
|
2025-09-07 09:25:51 +08:00
|
|
|
func attack(type):
|
2025-09-07 09:48:03 +08:00
|
|
|
var weaponPos = findWeaponAnchor("normal")
|
2025-09-07 09:25:51 +08:00
|
|
|
if type == 0:
|
2025-09-07 09:48:03 +08:00
|
|
|
for bullet in BulletBase.generate(preload("res://components/Bullets/BossAttack/Bear/ArrowSeven.tscn"), self, weaponPos, deg_to_rad(randf_range(0, 360))):
|
|
|
|
|
bullet.tracer = currentFocusedBoss
|