sprites on screen yay
This commit is contained in:
18
src/game/ecs/ecs_entity.c
Normal file
18
src/game/ecs/ecs_entity.c
Normal file
@ -0,0 +1,18 @@
|
||||
#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);
|
||||
}
|
Reference in New Issue
Block a user