1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-31 08:21:54 +08:00

feat: 添加小鸡角色显示名称,更新Boss状态条和伤害标签逻辑,增强EntityBase类的移动和攻击功能

This commit is contained in:
2025-08-26 14:26:45 +08:00
parent 5c64d01f7c
commit 5923660195
6 changed files with 86 additions and 10 deletions
+7
View File
@@ -12,7 +12,14 @@ func ai():
texture.play("idle")
if Input.is_action_pressed("attack"):
tryAttack(0)
if Input.is_action_just_pressed("sprint"):
trySprint()
func attack(type):
if type == 0:
var weaponPos = findWeaponAnchor("normal")
BulletBase.generate(preload("res://components/Bullets/PurpleCrystal.tscn"), self, weaponPos, (get_global_mouse_position() - weaponPos).angle())
func sprint():
move(Vector2(
Input.get_axis("m_left", "m_right"),
Input.get_axis("m_up", "m_down")
) * 6, true)