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
+2 -4
View File
@@ -28,10 +28,8 @@ bool PlayerDeathSystem::OnPlayerDeath(Events::PlayerDeath& e)
void PlayerDeathSystem::createDeathEffect(EntityWrapper player)
{
//load the explosioneffect XML
auto deathEffect = ResourceManager::Load<EntityXMLFile>("Schema/Entities/PlayerDeathExplosionWithCamera.xml");
EntityXMLFileParser parser(deathEffect);
EntityID deathEffectID = parser.MergeEntities(m_World);
EntityWrapper deathEffectEW = EntityWrapper(m_World, deathEffectID);
auto entityFile = ResourceManager::Load<EntityFile>("Schema/Entities/PlayerDeathExplosionWithCamera.xml");
EntityWrapper deathEffectEW = entityFile->MergeInto(m_World);
//components that we need from player
auto playerModel = player.FirstChildByName("PlayerModel");