X-Git-Url: http://git.purplebirdman.com/frog-ninja.git/blobdiff_plain/8225ba902c437bcadc8735df85a340e8bd10ed3d..2e697142bf5e1b94429281572bdc1cbf5868d5ce:/player/fall_to_roll.gd diff --git a/player/fall_to_roll.gd b/player/fall_to_roll.gd index 2fa1a14..090c840 100644 --- a/player/fall_to_roll.gd +++ b/player/fall_to_roll.gd @@ -3,29 +3,18 @@ class_name FallToRoll var finished := false -const roll_speed := 5.0 - func should_enter(input: InputPacket) -> String: if finished: input.actions.sort_custom(moves_priority_sort) return input.actions[0] - return "fallToRoll" - - -func update(input: InputPacket, delta: float): - player.velocity = get_new_velocity_from_input(input, delta, roll_speed) - player.move_and_slide() - update_skin(delta) + return state_name func on_enter_state(): finished = false - player.skin.animation_tree.animation_finished.connect(_on_animation_finished) - player.skin.transition_fallToRoll() 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)