mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 23:11:54 +08:00
6cf3c409e3
- 修改BulletBase.generate返回子弹实例数组而非数量 - 新增LGBTBoom特效场景 - 降低LGBT武器能量消耗从150降至10 - 移除Rooster角色的攻击方法,改为使用武器系统 - 重构LGBT子弹追踪逻辑,增加追踪时间和效率参数 - 在LGBT武器攻击时设置子弹伤害和追踪目标
33 lines
854 B
GDScript
33 lines
854 B
GDScript
extends EntityBase
|
|
class_name Rooster
|
|
|
|
func register():
|
|
attackCooldownMap[0] = 200
|
|
attackCooldownMap[1] = 6000
|
|
func ai():
|
|
texture.play("walk")
|
|
var direction = Vector2(
|
|
Input.get_axis("m_left", "m_right"),
|
|
Input.get_axis("m_up", "m_down")
|
|
)
|
|
move(direction)
|
|
if direction.length() == 0:
|
|
texture.play("idle")
|
|
if Input.is_action_pressed("attack"):
|
|
tryAttack(0)
|
|
elif Input.is_action_pressed("attack2"):
|
|
tryAttack(1)
|
|
if Input.is_action_just_pressed("sprint"):
|
|
trySprint()
|
|
if Input.is_action_just_pressed("heal"):
|
|
tryHeal(20)
|
|
func sprint():
|
|
move(Vector2(
|
|
Input.get_axis("m_left", "m_right"),
|
|
Input.get_axis("m_up", "m_down")
|
|
) * sprintMultiplier, true)
|
|
func heal(count: float):
|
|
health += count
|
|
DamageLabel.create(-count, false, damageAnchor.global_position + MathTool.randv2_range(GameRule.damageLabelSpawnOffset))
|
|
return count
|