Skip to content

Commit

Permalink
fix(In Game State): clear and push states depending on in-game
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowApex committed Aug 25, 2024
1 parent 0defac3 commit 038313d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/ui/card_ui/card_ui.gd
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ func _on_game_state_entered(_from: State) -> void:
continue
(child as Control).visible = false

# Clear all menu states
menu_state_machine.clear_states()


## Invoked when the in-game state is exited
func _on_game_state_exited(to: State) -> void:
Expand Down Expand Up @@ -192,7 +195,7 @@ func _on_game_state_removed() -> void:
if not state_machine.has_state(menu_state):
state_machine.set_state([menu_state])
if not menu_state_machine.has_state(home_state):
state_machine.set_state([home_state])
menu_state_machine.set_state([home_state])


# Sets the blur mode in gamescope
Expand Down

0 comments on commit 038313d

Please sign in to comment.