extends Node func _ready() -> void: loadStartMenu() func _process(delta: float) -> void: if G.extracted and get_child(0).name != "EndScreen": loadEndScren() func loadGame(): G.resetValues() for i in get_children(): i.queue_free() add_child(load("res://scenes/game/mainGame/main_game.tscn").instantiate()) func loadEndScren(): for i in get_children(): i.queue_free() add_child(load("res://scenes/menu/endScreen/end_screen.tscn").instantiate()) func loadStartMenu(): G.resetValues() for i in get_children(): i.queue_free() add_child(load("res://scenes/menu/startMenu/start_menu.tscn").instantiate())