87 std::vector<EntityMask> entityMasks_;
Manages the entities in an array using bitwise operations to know if it has components.
Definition: entity.h:35
void DestroyEntity(Entity entity)
DestroyEntity is a method that will erase all Component from the EntityMask. It means that EntityExis...
Definition: entity.cpp:44
std::size_t GetEntitiesSize() const
GetEntitiesSize is a method that returns the size of the EntityMask array.
Definition: entity.cpp:69
Entity CreateEntity()
CreateEntity is a method that will return the next available Entity index. It will look at the intern...
Definition: entity.cpp:19
void AddComponent(Entity entity, EntityMask mask)
AddComponent is a method that adds the bitwise entity mask to the entity mask. It is normally called ...
Definition: entity.cpp:50
bool EntityExists(Entity entity) const
EntityExists is a method that check if a certain Entity has any Component and thus do exist.
Definition: entity.cpp:63
void RemoveComponent(Entity entity, EntityMask mask)
RemoveComponent is a method that removes the bitwise entity mask to the entity mask.
Definition: entity.cpp:56
bool HasComponent(Entity entity, EntityMask mask) const
HasComponent is a method that check if a certain Entity has a EntityMask on.
Definition: entity.cpp:74
std::uint32_t EntityMask
EntityMask is the type used to define the bitwise mask of an Entity. It is used to know what Componen...
Definition: entity.h:22
constexpr Entity INVALID_ENTITY
INVALID_ENTITY is a constant that define an invalid Entity.
Definition: entity.h:26
constexpr EntityMask INVALID_ENTITY_MASK
INVALID_ENTITY_MASK is a constant that define an invalid or empty entity mask.
Definition: entity.h:30
std::uint32_t Entity
Entity is the type used to define an game world entity. An Entity is just an index,...
Definition: entity.h:17