Made EntityFileParser::MergeEntities return the base entity that was created, and also take an optional parent entity to create it under.

This commit is contained in:
2016-01-15 18:31:32 +01:00
parent 0469460029
commit 97e12ff550
3 changed files with 9 additions and 4 deletions
+2 -1
View File
@@ -9,12 +9,13 @@ class EntityFileParser
public:
EntityFileParser(const EntityFile* entityFile);
void MergeEntities(World* world);
EntityID MergeEntities(World* world, EntityID baseParent = EntityID_Invalid);
private:
const EntityFile* m_EntityFile;
EntityFileHandler m_Handler;
World* m_World = nullptr;
EntityID m_FirstEntity = EntityID_Invalid;
// Maps EntityIDs local to the file to real IDs in the world after they've been
// created in order to resolve parent-child relationships.
std::map<EntityID, EntityID> m_EntityIDMapper;