|
|
@ -8,10 +8,9 @@ namespace gaemstone.ECS; |
|
|
|
public static class SystemExtensions |
|
|
|
public static class SystemExtensions |
|
|
|
{ |
|
|
|
{ |
|
|
|
public static unsafe EntityRef InitSystem(this EntityRef entity, |
|
|
|
public static unsafe EntityRef InitSystem(this EntityRef entity, |
|
|
|
Entity phase, QueryDesc query, Action<Iterator> callback) |
|
|
|
QueryDesc query, Action<Iterator> callback) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var world = entity.World; |
|
|
|
var world = entity.World; |
|
|
|
entity.Add(world.DependsOn, phase); |
|
|
|
|
|
|
|
using var alloc = TempAllocator.Use(); |
|
|
|
using var alloc = TempAllocator.Use(); |
|
|
|
var desc = new ecs_system_desc_t { |
|
|
|
var desc = new ecs_system_desc_t { |
|
|
|
entity = entity, |
|
|
|
entity = entity, |
|
|
|