1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Characters/Bear.gd
T

18 lines
605 B
GDScript
Raw Normal View History

extends EntityBase
class_name Bear # 攻击方式模仿泰拉瑞亚光之女皇
func register():
fields[FieldStore.Entity.MAX_HEALTH] = 2000
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.25
attackCooldownMap[0] = 100
func spawn():
texture.play("walk")
func ai():
PresetEntityAI.follow(self, currentFocusedBoss, 0)
tryAttack(0)
func attack(type):
var weaponPos = findWeaponAnchor("normal")
if type == 0:
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