コード例 #1
0
        private void ConvertFile()
        {
            XmlElement spriterData = (XmlElement)ScmlFile.Scml.GetElementsByTagName("spriter_data")[0];
            XmlElement entity      = GetFirstChildByName(spriterData, "entity");
            string     name        = entity.GetAttribute("name");
            List <Alternate.Animation> animations = new List <Alternate.Animation>();

            foreach (XmlNode node in entity.ChildNodes)
            {
                if (node is XmlElement && node.Name.Equals("animation"))
                {
                    animations.Add(ParseAnimation((XmlElement)node));
                }
            }
            alternateFile = new Alternate.File(name, animations);
        }
コード例 #2
0
 public AlternateToScmlConverter(File scmlFile, Alternate.File alternateFile)
 {
     ScmlFile      = scmlFile;
     AlternateFile = alternateFile;
 }