Animaciones
unknown
plain_text
a year ago
436 B
5
Indexable
if is_on_floor() and health > 0 and !isHurt: if velocity == Vector2.ZERO: sprite.animation = "Idle" else: sprite.animation = "Running" elif !is_on_floor() and health > 0 and !isHurt: if velocity.y < 0: sprite.animation = "Jumping" else: sprite.animation = "Falling" elif isHurt: sprite.animation = "Hurt" wait_for_anim() if health == 0: sprite.animation = "Dying" set_physics_process(false)
Editor is loading...
Leave a Comment