|
|
|
@ -82,7 +82,7 @@ func handle_effects(delta):
|
|
|
|
var speed_factor = horizontal_velocity.length() / movement_speed / delta
|
|
|
|
var speed_factor = horizontal_velocity.length() / movement_speed / delta
|
|
|
|
if speed_factor > 0.05:
|
|
|
|
if speed_factor > 0.05:
|
|
|
|
if animation.current_animation != "walk":
|
|
|
|
if animation.current_animation != "walk":
|
|
|
|
animation.play("walk")
|
|
|
|
animation.play("walk", 0.1)
|
|
|
|
|
|
|
|
|
|
|
|
if speed_factor > 0.3:
|
|
|
|
if speed_factor > 0.3:
|
|
|
|
sound_footsteps.stream_paused = false
|
|
|
|
sound_footsteps.stream_paused = false
|
|
|
|
@ -92,9 +92,9 @@ func handle_effects(delta):
|
|
|
|
particles_trail.emitting = true
|
|
|
|
particles_trail.emitting = true
|
|
|
|
|
|
|
|
|
|
|
|
elif animation.current_animation != "idle":
|
|
|
|
elif animation.current_animation != "idle":
|
|
|
|
animation.play("idle")
|
|
|
|
animation.play("idle", 0.1)
|
|
|
|
elif animation.current_animation != "jump":
|
|
|
|
elif animation.current_animation != "jump":
|
|
|
|
animation.play("jump")
|
|
|
|
animation.play("jump", 0.1)
|
|
|
|
|
|
|
|
|
|
|
|
# Handle movement input
|
|
|
|
# Handle movement input
|
|
|
|
|
|
|
|
|
|
|
|
|