31 lines
No EOL
573 B
D
31 lines
No EOL
573 B
D
module ecs.core;
|
|
|
|
public import ecs.manager;
|
|
public import ecs.entity;
|
|
|
|
static struct ECS
|
|
{
|
|
mixin template System(uint jobs_count = 32)
|
|
{
|
|
__gshared ushort system_id;
|
|
EntityManager.Job[] _ecs_jobs;
|
|
|
|
void __ecsInitialize() nothrow @nogc
|
|
{
|
|
import std.experimental.allocator.mallocator;
|
|
import std.experimental.allocator;
|
|
_ecs_jobs = Mallocator.instance.makeArray!(EntityManager.Job)(jobs_count);
|
|
}
|
|
}
|
|
|
|
mixin template Component()
|
|
{
|
|
__gshared ushort component_id;
|
|
}
|
|
|
|
mixin template Event()
|
|
{
|
|
__gshared ushort event_id;
|
|
EntityID entity_id;
|
|
}
|
|
} |