Forráskód Böngészése

Cache l'ecran titre quand un niveau est lance

DricomDragon 11 hónapja
szülő
commit
82f530ce1a
1 módosított fájl, 5 hozzáadás és 2 törlés
  1. 5 2
      godot/exec/choix/choix.gd

+ 5 - 2
godot/exec/choix/choix.gd

@@ -1,6 +1,9 @@
 extends Node2D
 
 
+@onready var monde: Node = get_parent()
+
+
 func _ready() -> void:
 	for child in get_children():
 		assert(child is Planete, "Seules les planetes sont autorisees dans le systeme")
@@ -9,5 +12,5 @@ func _ready() -> void:
 
 
 func demarrer_niveau(niveau: PackedScene) -> void:
-	add_sibling(niveau.instantiate())
-	queue_free()
+	monde.add_sibling(niveau.instantiate())
+	monde.queue_free()