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

24
maps/world.gd Normal file
View File

@@ -0,0 +1,24 @@
extends Node3D
@onready var world: World = $World
@onready var spawn_point: E_SpawnPoint = $SpawnPoint
@onready var spawn_point_2: E_SpawnPoint = $SpawnPoint2
func _ready():
ECS.world = world
#var player_scene = preload("res://GECS/entities/BasicEnemy/BasicEnemy.tscn") # Adjust path as needed
#var basic_enemy = player_scene.instantiate() as BasicEnemy
#
#add_child(basic_enemy) # Add to scene tree
ECS.world.add_entity(spawn_point)
ECS.world.add_entity(spawn_point_2)
func _process(delta: float) -> void:
if ECS.world:
ECS.process(delta, "gameplay")
func _physics_process(delta):
if ECS.world:
ECS.process(delta, "physics")