extends Control @export var title_screen: PackedScene @export var office: PackedScene @export var bedroom: PackedScene # Called when the node enters the scene tree for the first time. func _ready() -> void: #Adding Scenes var title_screen = title_screen.instantiate() var office = office.instantiate() var bedroom = bedroom.instantiate() add_child(title_screen) add_child(office) add_child(bedroom) title_screen.name = "TitleScreen" office.name = "Office" bedroom.name = "Bedroom" title_screen.hide() office.hide() bedroom.hide() title_screen.show() #Connecting Signals title_screen.connect("new_game_pressed", _on_new_game_pressed) #get_tree().change_scene_to_file("res://corridor.tscn") pass # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: pass func _on_new_game_pressed(): TransitionScreen.transition() await TransitionScreen.on_transition_finished $TitleScreen.hide() $Office.show()