Skip to content

Commit

Permalink
B-2: Added missing set current_state to false when switching (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecSouthward authored Jun 11, 2024
1 parent f3b3968 commit b835452
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions StateMachine/state_machine.gd
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func on_state_transitioned(state : State, new_state_name : String) -> void:
if current_state:
current_state.exit()
new_state.active = false
current_state.active = false

new_state.enter()
new_state.active = true
Expand Down

0 comments on commit b835452

Please sign in to comment.