]> Untitled Git - frog-ninja.git/blobdiff - player/fall_to_landing.gd
Separated the Visual from the Model
[frog-ninja.git] / player / fall_to_landing.gd
index 2ad905bc14ffab4015d908b904ec6af9033ca823..b1f4efb380176daa9a690f45dcdf38a56960bc2a 100644 (file)
@@ -9,17 +9,14 @@ func should_enter(input: InputPacket) -> String:
        if finished:
                input.actions.sort_custom(moves_priority_sort)
                return input.actions[0]
-       return "fallToLanding"
+       return state_name
 
 
 func on_enter_state():
        finished = false
        player.velocity = Vector3.ZERO
-       player.skin.animation_tree.animation_finished.connect(_on_animation_finished)
-       player.skin.transition_fallToLanding()
 
 
 func _on_animation_finished(_name: String):
        # TODO: make sure animation is finished by using name
        finished = true
-       player.skin.animation_tree.animation_finished.disconnect(_on_animation_finished)