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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user