Fixed walk animation
This commit is contained in:
parent
af14ac6fee
commit
b30465742f
1 changed files with 0 additions and 5 deletions
|
|
@ -113,15 +113,10 @@ func manage_animation() -> void:
|
||||||
anim_sprite.scale.x = - abs(anim_sprite.scale.x) * facing
|
anim_sprite.scale.x = - abs(anim_sprite.scale.x) * facing
|
||||||
if(is_on_floor() and not $AnimatedSprite2D.is_playing()):
|
if(is_on_floor() and not $AnimatedSprite2D.is_playing()):
|
||||||
anim_sprite.play("walk")
|
anim_sprite.play("walk")
|
||||||
else:
|
|
||||||
if anim_sprite.animation == "walk":
|
|
||||||
anim_sprite.stop()
|
|
||||||
else:
|
else:
|
||||||
if anim_sprite.animation == "walk":
|
if anim_sprite.animation == "walk":
|
||||||
anim_sprite.stop()
|
anim_sprite.stop()
|
||||||
|
|
||||||
if not $AnimatedSprite2D.is_playing():
|
|
||||||
$AnimatedSprite2D.play("idle")
|
|
||||||
|
|
||||||
func manage_velocity(delta: float) -> void:
|
func manage_velocity(delta: float) -> void:
|
||||||
up_direction = (position - earth_center).normalized();
|
up_direction = (position - earth_center).normalized();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue