Renamed EntityFile to EntityXMLFile to be able to separate file parsing from entity creation

This commit is contained in:
2016-03-02 18:42:11 +01:00
parent 62c8196ad4
commit 26d6546d79
33 changed files with 121 additions and 121 deletions
+4 -4
View File
@@ -129,7 +129,7 @@ void EditorSystem::OnEntitySelected(EntityWrapper entity)
void EditorSystem::OnEntitySave(EntityWrapper entity, boost::filesystem::path filePath)
{
EntityFileWriter writer(filePath);
EntityXMLFileWriter writer(filePath);
writer.WriteEntity(entity.World, entity.ID);
}
@@ -259,10 +259,10 @@ EntityWrapper EditorSystem::importEntity(EntityWrapper parent, boost::filesystem
}
try {
auto entityFile = ResourceManager::Load<EntityFile>(filePath.string());
EntityFilePreprocessor fpp(entityFile);
auto entityFile = ResourceManager::Load<EntityXMLFile>(filePath.string());
EntityXMLFilePreprocessor fpp(entityFile);
fpp.RegisterComponents(parent.World);
EntityFileParser fp(entityFile);
EntityXMLFileParser fp(entityFile);
EntityID newEntity = fp.MergeEntities(parent.World, parent.ID);
return EntityWrapper(parent.World, newEntity);
} catch (const std::exception& e) {