Skip to content

Commit

Permalink
fix: take first matching transition on state enter rather than last w…
Browse files Browse the repository at this point in the history
…hen all transitions have a delay
  • Loading branch information
derkork committed Apr 17, 2024
1 parent 6b44595 commit bf673ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions addons/godot_state_charts/state_chart_state.gd
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ func _state_enter(expect_transition:bool = false):
if not transition.has_event and transition.evaluate_guard():
# first match wins
_run_transition(transition)
break

## Called when the state is exited.
func _state_exit():
Expand Down

0 comments on commit bf673ce

Please sign in to comment.