25 lines
305 B
D
25 lines
305 B
D
module ecs.entity;
|
|
|
|
import ecs.manager;
|
|
|
|
struct EntityID
|
|
{
|
|
uint id;
|
|
uint counter;
|
|
}
|
|
|
|
struct Entity
|
|
{
|
|
EntityID id;
|
|
|
|
void updateID()
|
|
{
|
|
EntityManager.instance.id_manager.update(this);
|
|
}
|
|
}
|
|
|
|
struct EntityTemplate
|
|
{
|
|
ubyte[] entity_data;
|
|
EntityManager.EntityInfo* info;
|
|
}
|