diff --git a/scripts/spawn_control.gd b/scripts/spawn_control.gd index 5101aa3..d74d560 100644 --- a/scripts/spawn_control.gd +++ b/scripts/spawn_control.gd @@ -86,7 +86,7 @@ func _active_stage_idx() -> int: func _spawn_elite(scene: PackedScene) -> void: var enemy = scene.instantiate() enemy.global_position = get_spawn_position() - add_child(enemy) + get_node("/root/Game/World").add_child(enemy) enemy.scale = Vector2(ELITE_SCALE, ELITE_SCALE) enemy.max_hp = enemy.max_hp * ELITE_HP_MULT enemy.hp = enemy.max_hp @@ -140,4 +140,4 @@ func _spawn_one(entry: StageEntry, state: Dictionary) -> void: state["alive"] += 1 state["spawned_total"] += 1 enemy.tree_exited.connect(func(): state["alive"] -= 1) - add_child(enemy) + get_node("/root/Game/World").add_child(enemy)