Files
calamity-cobra-2/src/game/ecs/ecs_entity.c
2023-08-14 03:58:13 -04:00

19 lines
335 B
C

#include "ecs_entity.h"
/* Returns a new entity ID. */
u32
ecs_entity_add(ECS* self)
{
self->nextID++;
return self->nextID;
}
/* Removes all components associated with an entity. */
void
ecs_entity_delete(ECS* self, u32 id)
{
for (s32 i = 0; i < ECS_COMPONENT_COUNT; i++)
ecs_component_delete(self, (ECSComponentType)i, id);
}