feat: Add a loading screen, a lobby scene, and a new main game script, along with a custom font.

This commit is contained in:
Yogi Wiguna
2026-03-17 11:11:00 +08:00
parent 49c8d794c2
commit b877f94e34
8 changed files with 345 additions and 17 deletions
+10 -2
View File
@@ -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: