I'm trying to make animated transitions, I've prepared the assets but I don't know how to do the code, maybe someone knows a simple way that can be applied to the code I wrote below
func _physics_process(delta):
if Input.is_action_pressed("ingame_left"):
velocity.x = -movementspeed
$AnimatedSprite.play("run")
##how to do idle to run animation transition?##
elif Input.is_action_pressed("ingame_right"):
velocity.x = movementspeed
$AnimatedSprite.play("run")
else:
$AnimatedSprite.play("idle")
if not is_on_floor():
$AnimatedSprite.play("jump")
Also, video for context