entity.h (285B)
1 #pragma once 2 3 #include <stdbool.h> 4 #include "core/ecs/component.h" 5 6 typedef struct Entity { 7 int id; 8 Component *components; 9 } Entity; 10 11 Entity * Entity_New(int id); 12 bool Entity_Add_Component(Entity *e, Component c); 13 Component * Entity_Find_Component(Entity *e, ComponentType t);