Files
lobby-server/scenes/data/game_state.gd
itdominator 3fcabe1a53 refactor: simplify lobby server architecture and update app metadata
* remove legacy data bridge, RPC, and server bootstrap files
* simplify lobby scene and node hierarchy
* rename lobby UI scene path and update signal handlers
* replace the application icon and configure the boot splash
* add project description and version metadata
2026-08-12 16:38:38 -05:00

25 lines
470 B
GDScript

class_name GameState extends Node
func _init() -> void:
Globals.game_state = self
func set_game_scene(scene_str: String) -> void:
var scene = load(scene_str).instantiate()
var target = get_tree().root.find_child("scene", true, false)
scene.name = "lobby_screen"
clear_game_scene(target)
target.add_child(scene)
func clear_game_scene(container: Node) -> void:
for child in container.get_children():
child.queue_free()
await get_tree().process_frame