extends Marker2D

@export var spawnObjectsPaths : Array[String] = []
@export var enabled = true

func _ready() -> void:
	randomize()

func spawn(spawnNode : Node):
	if enabled:
		var t = randi_range(0, spawnObjectsPaths.size())
		var spawnObject = load(spawnObjectsPaths.pick_random()).instantiate()
		spawnObject.global_position = global_position
		spawnNode.add_child(spawnObject)
