mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 23:11:54 +08:00
c80d3af6f9
新增狗、猫、鸡、MTY等角色的图片和动画资源,并调整部分角色的属性和动画逻辑。包括: - 添加狗角色的行走动画和图片资源 - 更新猫角色的行走动画和碰撞体 - 调整鸡角色的属性和动画帧 - 修改MTY角色的攻击冷却时间 - 更新彩虹糖的数值属性 - 优化链式机枪的攻击力属性 - 添加企鹅角色的多帧动画资源 - 更新熊角色的行走动画和面具资源 同时修复了部分角色的碰撞体大小和位置问题。
21 lines
633 B
GDScript
21 lines
633 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] = randi_range(3000, 5000)
|
|
func spawn():
|
|
texture.play("walk")
|
|
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
|