コード例 #1
0
 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());
 }
コード例 #2
0
        public Deserializer(EAN_File _eanFile)
        {
            writeXmlMode = false;
            eanFile      = _eanFile;
            eanFile.ValidateAnimationIndexes();
            eanFile.SortEntries();
            nonHierarchalBones = eanFile.Skeleton.GetNonHierarchalBoneList();

            ValidateAnimationBones();

            Write();
        }
コード例 #3
0
        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());
        }