public Deserializer(EAN_File _eanFile, string location) { writeXmlMode = false; saveLocation = location; eanFile = _eanFile; eanFile.ValidateAnimationIndexes(); eanFile.SortEntries(); nonHierarchalBones = eanFile.Skeleton.GetNonHierarchalBoneList(); ValidateAnimationBones(); Write(); File.WriteAllBytes(saveLocation, bytes.ToArray()); }
public Deserializer(EAN_File _eanFile) { writeXmlMode = false; eanFile = _eanFile; eanFile.ValidateAnimationIndexes(); eanFile.SortEntries(); nonHierarchalBones = eanFile.Skeleton.GetNonHierarchalBoneList(); ValidateAnimationBones(); Write(); }
public Deserializer(string location) { writeXmlMode = true; saveLocation = String.Format("{0}/{1}", Path.GetDirectoryName(location), Path.GetFileNameWithoutExtension(location)); YAXSerializer serializer = new YAXSerializer(typeof(EAN_File), YAXSerializationOptions.DontSerializeNullObjects); eanFile = (EAN_File)serializer.DeserializeFromFile(location); eanFile.ValidateAnimationIndexes(); eanFile.SortEntries(); nonHierarchalBones = eanFile.Skeleton.GetNonHierarchalBoneList(); ValidateAnimationBones(); Write(); File.WriteAllBytes(saveLocation, bytes.ToArray()); }