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

更新EntityBase和Rooster类,添加动画支持并修复变量命名

This commit is contained in:
2025-08-26 10:55:39 +08:00
parent aae36b740e
commit df3abdb852
4 changed files with 31 additions and 7 deletions
+3
View File
@@ -2,8 +2,11 @@ extends EntityBase
class_name Rooster
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")