Fix #158: Add a transition from Hook -> Run state

This commit is contained in:
Nathan Lovato 2019-08-14 10:22:05 +02:00
parent 1d5f921cf4
commit 9f4579e225
2 changed files with 3 additions and 1 deletions

View file

@ -30,6 +30,9 @@ func physics_process(delta: float) -> void:
if distance < velocity.length() * delta:
velocity = velocity.normalized() * arrive_push
_state_machine.transition_to("Move/Air", {velocity = velocity})
if owner.is_on_floor():
_state_machine.transition_to("Move/Run")
func enter(msg: Dictionary = {}) -> void:

View file

@ -6,7 +6,6 @@ with state transitions
"""
func unhandled_input(event: InputEvent) -> void:
_parent.unhandled_input(event)