extends Node @onready var choix_niveau: Node = find_parent("ChoixNiveau") func _ready() -> void: _connecter_choix_niveau() _focus_premier_niveau() func _notification(recue: int) -> void: if NOTIFICATION_UNPAUSED == recue: _focus_premier_niveau() func _connecter_choix_niveau() -> void: for child in get_children(): assert(child is Planete, "Seules les planetes sont autorisees dans le systeme") var planete: Planete = child as Planete planete.niveau_choisi.connect(choix_niveau.demarrer_niveau) func _focus_premier_niveau() -> void: assert(get_child_count() > 0, "Au moins un niveau doit exister dans le jeu") var premier_niveau: Planete = get_children().front() as Planete premier_niveau.grab_focus()