Delayed removal of entities.
This commit is contained in:
@@ -85,9 +85,13 @@ protected:
|
||||
std::unordered_map<std::string, std::list<std::shared_ptr<Component>>> m_ComponentsOfType;
|
||||
std::unordered_map<EntityID, std::map<std::string, std::shared_ptr<Component>>> m_EntityComponents;
|
||||
|
||||
std::list<EntityID> m_EntitiesToRemove;
|
||||
void ProcessEntityRemovals();
|
||||
|
||||
EntityID GenerateEntityID();
|
||||
|
||||
void RecycleEntityID(EntityID id);
|
||||
|
||||
};
|
||||
|
||||
template <class T>
|
||||
|
||||
Reference in New Issue
Block a user