extends Node var level var scene = preload("res://fase1.tscn") var fase = 1 func _ready(): level = scene.instantiate() add_child(level) level.completou.connect(_on_completou) func _on_completou(): fase += 1 level.queue_free() match fase: 1: scene = load("res://fase1.tscn") 2: scene = load("res://fase2.tscn") _: scene = load("res://fase1.tscn") level = scene.instantiate() call_deferred("add_child", level) level.completou.connect(_on_completou)