mirror of
https://github.com/GDQuest/godot-platformer-2d.git
synced 2026-07-17 16:34:54 +00:00
Fix #158: Add a transition from Hook -> Run state
This commit is contained in:
parent
1d5f921cf4
commit
9f4579e225
2 changed files with 3 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ with state transitions
|
|||
"""
|
||||
|
||||
|
||||
|
||||
func unhandled_input(event: InputEvent) -> void:
|
||||
_parent.unhandled_input(event)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue