]> Untitled Git - frog-ninja.git/blob - player/fall_to_roll.gd
Separated the Visual from the Model
[frog-ninja.git] / player / fall_to_roll.gd
1 extends Walk
2 class_name FallToRoll
3
4
5 var finished := false
6
7 func should_enter(input: InputPacket) -> String:
8         if finished:
9                 input.actions.sort_custom(moves_priority_sort)
10                 return input.actions[0]
11         return state_name
12
13
14 func on_enter_state():
15         finished = false
16
17
18 func _on_animation_finished(_name: String):
19         # TODO: make sure animation is finished by using name
20         finished = true