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); }
public AlternateToScmlConverter(File scmlFile, Alternate.File alternateFile) { ScmlFile = scmlFile; AlternateFile = alternateFile; }