func update_animation_paremeters(): if(velocity == Vector2.ZERO ): animation_tree["paremeters/Idle/blend_position"] = true animation_tree["paremeters/Walk/blend_position"] = false else: animation_tree["paremeters/Idle/blend_position"] = false animation_tree["paremeters/Walk/blend_position"] = true Строка 14:Identifier "direction" not declared in the current scope. такая ошибка у меня не в первый раз возникает не магу понять что такое
ой б, забудь про годот. я тоже пытался там интерфейс игры адекватный только через код делать + у юнити больше возможностей + они исправились и он до 100к долларов бесплатный снова
@export var speed : float = 150
@onready var animation_tree : AnimationTree = $AnimationTree
func _ready():
pass
func _process(_delta):
velocity = Vector2(Input.get_axis("left", "right"), Input.get_axis("up", "down")).normalized() * speed
if up_direction:
velocity = direction * speed
else:
velocity = Vector2.ZERO
move_and_slide()
func update_animation_paremeters():
if(velocity == Vector2.ZERO ):
animation_tree["paremeters/Idle/blend_position"] = true
animation_tree["paremeters/Walk/blend_position"] = false
else:
animation_tree["paremeters/Idle/blend_position"] = false
animation_tree["paremeters/Walk/blend_position"] = true Строка 14:Identifier "direction" not declared in the current scope. такая ошибка у меня не в первый раз возникает не магу понять что такое