Updated all uses of EntityXMLFile to use the new EntityFile to load entities into a world.

This commit is contained in:
2016-03-02 20:12:59 +01:00
parent 3ef15dcb81
commit 7624c6ee0a
17 changed files with 41 additions and 60 deletions
+4 -5
View File
@@ -38,11 +38,10 @@ bool BoostSystem::OnPlayerDamage(Events::PlayerDamage& e)
m_World->DeleteEntity(playerBoostAssaultEntity.ID);
}
//load boost XML file, set it entity parented with the victim player
auto entityFile = ResourceManager::Load<EntityXMLFile>(classXML);
EntityXMLFileParser parser(entityFile);
EntityID boostAssaultEntity = parser.MergeEntities(m_World);
m_World->SetName(boostAssaultEntity, className);
m_World->SetParent(boostAssaultEntity, e.Victim.ID);
auto entityFile = ResourceManager::Load<EntityFile>(classXML);
EntityWrapper boostAssaultEntity = entityFile->MergeInto(m_World);
m_World->SetName(boostAssaultEntity.ID, className);
m_World->SetParent(boostAssaultEntity.ID, e.Victim.ID);
return true;
}