mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
b1e25afb02
修改MTY、Dog、Cat和Hen角色的移动速度参数,降低部分角色的速度以平衡游戏性 调整Dog和Hen的攻击冷却时间范围,使战斗节奏更合理 简化Hen的攻击逻辑,移除随机子弹数量生成
19 lines
585 B
GDScript
19 lines
585 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(1000, 3000)
|
|
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)
|
|
BulletBase.generate(ComponentManager.getBullet("DogCircle"), self , weaponPos, angle)
|
|
return true
|