|
@@ -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()
|