mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
5425e95c2f
添加哈士奇角色,包括角色脚本、贴图资源、子弹效果和音效 - 实现哈士奇的基础AI行为和攻击逻辑 - 添加专属子弹"吼叫声波"及其特效 - 更新Wave配置加入哈士奇角色 - 为猫角色添加中文显示名称 - 优化Ring着色器增加透明度参数
20 lines
579 B
GDScript
20 lines
579 B
GDScript
extends EntityBase
|
|
|
|
func register():
|
|
fields[FieldStore.Entity.MAX_HEALTH] = 120
|
|
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.2
|
|
fields[FieldStore.Entity.OFFSET_SHOOT] = 0
|
|
attackCooldownMap[0] = 2000
|
|
|
|
func ai():
|
|
PresetEntityAI.follow(self, currentFocusedBoss, 300)
|
|
tryAttack(0)
|
|
func attack(type):
|
|
if type == 0:
|
|
var weaponPos = findWeaponAnchor("normal")
|
|
var angle = weaponPos.angle_to_point(currentFocusedBoss.position)
|
|
for i in 3:
|
|
BulletBase.generate(ComponentManager.getBullet("DogCircle"), self, weaponPos, angle)
|
|
await TickTool.millseconds(100)
|
|
return true
|