Added KnowsEntity function to ComponentPool to query whether an entity has a component attached

This commit is contained in:
2015-12-13 19:59:25 +01:00
parent b66cf47ff0
commit 2018ba27ae
2 changed files with 8 additions and 0 deletions
+2
View File
@@ -54,6 +54,8 @@ public:
ComponentWrapper Allocate(EntityID entity);
// Get the component belonging to a specific entity
ComponentWrapper GetByEntity(EntityID ent);
// Returns true if the pool contains a component for the specified entity
bool KnowsEntity(EntityID ent);
// Delete a component and free its memory
void Delete(ComponentWrapper& wrapper);