extends Node3D @export_file(".tscn") var youth_room_path: String @export_file(".tscn") var voluntary_room: String @export_file(".tscn") var study_room: String @onready var menu_animation: AnimationTree = %MenuAnimationTree @onready var focus_forward = %"Main Menu" var in_game = false var current_loaded_room: Node3D var currently_loading_room: String = "": set(path): if path != "": ResourceLoader.load_threaded_request(path, "PackedScene") menu_animation["parameters/conditions/loading_done"] = false menu_animation["parameters/conditions/load_save"] = true currently_loading_room = path else: menu_animation["parameters/conditions/loading_done"] = true menu_animation["parameters/conditions/load_save"] = false # Called when the node enters the scene tree for the first time. func _ready(): currently_loading_room = youth_room_path func _process(delta: float) -> void: if currently_loading_room != "": var progress:Array if ResourceLoader.load_threaded_get_status(youth_room_path, progress) == 3: current_loaded_room = ResourceLoader.load_threaded_get(youth_room_path).instantiate() add_child(current_loaded_room) move_child(current_loaded_room, 0) currently_loading_room = "" func debug_youth(): get_child(1).hide() get_child(2).hide() get_child(3).hide() get_child(0).get_ready() get_child(0).start()