Files
godot-shader-experiments/maps/world.gd
2026-01-15 15:27:48 +01:00

25 lines
646 B
GDScript

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")