D5/Entity/Level/GameScene.gd
2025-05-09 15:36:04 +08:00

15 lines
463 B
GDScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

extends Node2D
func _ready():
# 1. 加载当前关卡从GameState获取
var level_path = "res://Entity/Level/" + GameState.get_value("level", "N/A") + ".tscn"
var level = load(level_path).instantiate()
$CurrentLevel.add_child(level)
# 2. 初始化UI通过UIManager
#print("GameScene: 初始化UI通过UIManager")
#UIManager.initialize_ui($UI_Main)
# 3. 通知GameManager初始化完成
#GameManager.mark_component_ready("ui_system")