mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 15:01:53 +08:00
259b856f90
refactor(Bullets): 重写Volcano子弹的旋转逻辑和动画 火山子弹现在会跟随鼠标指向,并添加了新的攻击动画 feat(Weapons): 更新Volcano武器的属性和行为 调整伤害、旋转速度等属性,移除多子弹生成逻辑 chore: 为Rooster角色添加Volcano武器
26 lines
849 B
GDScript
26 lines
849 B
GDScript
extends EntityBase
|
|
class_name KukeChild
|
|
|
|
var masterMine: KukeMC
|
|
|
|
func register():
|
|
fields[FieldStore.Entity.MAX_HEALTH] = 25
|
|
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.35
|
|
attackCooldownMap[0] = 100
|
|
attackCooldownMap[1] = 8000
|
|
func ai():
|
|
PresetEntityAI.follow(self, currentFocusedBoss, 700)
|
|
tryAttack(0)
|
|
tryAttack(1)
|
|
if timeLived() > 10000:
|
|
tryKill()
|
|
func attack(type):
|
|
if type == 0:
|
|
BulletBase.generate(ComponentManager.getBullet("PurpleCrystalSmall"), self, findWeaponAnchor("normal"), position.angle_to_point(currentFocusedBoss.position))
|
|
await TickTool.millseconds(randi_range(5, 25))
|
|
elif type == 1:
|
|
BulletBase.generate(ComponentManager.getBullet("HeavyCrystal"), self, findWeaponAnchor("normal"), position.angle_to_point(currentFocusedBoss.position))
|
|
func kill():
|
|
if is_instance_valid(masterMine):
|
|
masterMine.tryHeal(100)
|