@tool
class_name E_SpawnPoint
extends Entity

@export var spawn_prefab: PackedScene
@export var spawn_frequency: float = -1

func on_ready():
	if has_component(C_SpawnPoint):
		var c_spawn_point = get_component(C_SpawnPoint) as C_SpawnPoint
		if spawn_prefab != null && spawn_prefab.can_instantiate():
			c_spawn_point.spawn_prefab = spawn_prefab
		if spawn_frequency > 0:
			c_spawn_point.spawn_frequency = spawn_frequency
