mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-29 07:21:54 +08:00
c80d3af6f9
新增狗、猫、鸡、MTY等角色的图片和动画资源,并调整部分角色的属性和动画逻辑。包括: - 添加狗角色的行走动画和图片资源 - 更新猫角色的行走动画和碰撞体 - 调整鸡角色的属性和动画帧 - 修改MTY角色的攻击冷却时间 - 更新彩虹糖的数值属性 - 优化链式机枪的攻击力属性 - 添加企鹅角色的多帧动画资源 - 更新熊角色的行走动画和面具资源 同时修复了部分角色的碰撞体大小和位置问题。
21 lines
618 B
GDScript
21 lines
618 B
GDScript
extends EntityBase
|
|
class_name Maodie
|
|
|
|
func register():
|
|
fields[FieldStore.Entity.MAX_HEALTH] = 75
|
|
fields[FieldStore.Entity.MOVEMENT_SPEED] = randf_range(0.5, 0.8)
|
|
attackCooldownMap[0] = randi_range(5000, 8000)
|
|
sprintMultiplier = randf_range(5, 15)
|
|
func spawn():
|
|
texture.play("walk")
|
|
func ai():
|
|
PresetEntityAI.follow(self, currentFocusedBoss)
|
|
tryAttack(0, true)
|
|
func attack(type: int):
|
|
if type == 0:
|
|
BulletBase.generate(ComponentManager.getBullet("ChickSprint"), self, position, 0)
|
|
trySprint()
|
|
return true
|
|
func sprint():
|
|
move((currentFocusedBoss.position - position).normalized() * sprintMultiplier, true)
|