feat(menus): ✨ Introduce completeSetup() and transitionToLoadingScreen() functions for game initialization and scene transitions
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
20c1194d7a
commit
c30b423a0c
1 changed files with 6 additions and 0 deletions
|
|
@ -79,7 +79,13 @@ func _on_start_pressed() -> void:
|
|||
"map_size": MAP_SIZE_IDS[map_size_idx],
|
||||
"param_overrides": param_overrides,
|
||||
}
|
||||
GameState.initialize_game(settings)
|
||||
game_started.emit(settings)
|
||||
var main: Node = get_tree().root.get_node_or_null("Main")
|
||||
if main != null and main.has_method("change_scene"):
|
||||
main.change_scene("res://engine/scenes/menus/loading_screen.tscn")
|
||||
else:
|
||||
get_tree().change_scene_to_file("res://engine/scenes/menus/loading_screen.tscn")
|
||||
|
||||
|
||||
func _on_back_pressed() -> void:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue