Fix parser compatible for layer project file

This commit is contained in:
XiaoFeng 2015-07-28 18:11:07 +08:00
parent 2d805b052b
commit faee3e7807
1 changed files with 2 additions and 2 deletions

View File

@ -269,7 +269,7 @@ std::string FlatBuffersSerialize::serializeFlatBuffersWithXMLFile(const std::str
else
nameElem = nameElem->Next();
}
if (rootType == "GameNodeObjectData") // for adaptate old version
if (rootType == "GameNodeObjectData" || rootType == "GameLayerObjectData") // for adaptate old version
rootType = "NodeObjectData";
nodeTree = createNodeTree(objectData, rootType);
@ -1318,7 +1318,7 @@ FlatBufferBuilder* FlatBuffersSerialize::createFlatBuffersWithXMLFileForSimulato
else
nameElem = nameElem->Next();
}
if (rootType == "GameNodeObjectData") // for adaptate old version
if (rootType == "GameNodeObjectData" || rootType == "GameLayerObjectData") // for adaptate old version
rootType = "NodeObjectData";
nodeTree = createNodeTreeForSimulator(objectData, rootType);
}