1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-29 07:21:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Characters/KukeChild.gd
T
fallingshrimp 7d79c3eff6 feat(资源): 添加新角色和音效资源并调整角色属性
添加母鸡、酷可小弟和狗的新资源文件
调整猫、狗和母鸡的受伤音效频率
修改酷可小弟的最大生命值为20
更新角色碰撞体和贴图设置
2025-11-22 22:43:26 +08:00

26 lines
849 B
GDScript

extends EntityBase
class_name KukeChild
var masterMine: KukeMC
func register():
fields[FieldStore.Entity.MAX_HEALTH] = 20
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)