feat: Add a loading screen, a lobby scene, and a new main game script, along with a custom font.
This commit is contained in:
+10
-2
@@ -736,8 +736,16 @@ func _on_all_players_ready() -> void:
|
||||
|
||||
func _on_game_starting() -> void:
|
||||
connection_status.text = "Starting game..."
|
||||
await get_tree().create_timer(0.5).timeout
|
||||
get_tree().change_scene_to_file("res://scenes/main.tscn")
|
||||
|
||||
# Instantiate and use the loading screen
|
||||
var loading_screen_scene = load("res://scenes/loading_screen/loading_screen.tscn")
|
||||
if loading_screen_scene:
|
||||
var loading_screen = loading_screen_scene.instantiate()
|
||||
get_tree().root.add_child(loading_screen)
|
||||
loading_screen.load_level("res://scenes/main.tscn")
|
||||
else:
|
||||
# Fallback if loading screen fails to load
|
||||
get_tree().change_scene_to_file("res://scenes/main.tscn")
|
||||
|
||||
func _on_match_duration_changed(duration_seconds: int) -> void:
|
||||
if not LobbyManager.is_host:
|
||||
|
||||
Reference in New Issue
Block a user