extends VBoxContainer func _ready() -> void: if not GlobalConfig.DEBUG: queue_free() return $DebugMode.pressed.connect(_exit_debug_mode) $Chapter1.pressed.connect(_start_game.bind(1)) $Chapter2.pressed.connect(_start_game.bind(2)) $Chapter3.pressed.connect(_start_game.bind(3)) func _exit_debug_mode() -> void: GlobalConfig.DEBUG = false print_rich("[color=orange]Debug mode disabled[/color]") queue_free() func _start_game(chapter: int) -> void: $"../SfxClick".global_play() var archive_res: AssembledArchive if chapter == 1: archive_res = load("uid://x2yr8b2ul5al") elif chapter == 2: archive_res = load("uid://b45y2iffjdieg") archive_res = archive_res.duplicate(true) ArchiveManager.create_and_use_new_archive(1) archive_res.take_over_path(ArchiveManager.archive.resource_path) ArchiveManager.archive = archive_res # new game 时音量渐隐 $"../BgmControl".stop(0.5) SceneManager.enter_main_scene()