basic ECS spawner

This commit is contained in:
2026-01-15 15:27:48 +01:00
parent 24a781f36a
commit eb737b469c
860 changed files with 58621 additions and 32 deletions

View File

@@ -0,0 +1,14 @@
@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