Inheritance: XmlObjectNode
        protected override sealed void LoadFromXml(string xml)
        {
            var document = XDocument.Load(new StringReader(xml));

            document.Declaration = new XDeclaration("1.0", "UTF-8", "yes");

            XmlParserTempProjectHelper.Program = this;

            var project = document.Element(XmlConstants.Program);

            ProgramHeader = new XmlProjectHeader(project.Element(XmlConstants.Header));
            SpriteList    = new XmlSpriteList(project.Element(XmlConstants.ObjectList));
            if (project.Element(XmlConstants.Variables) != null) //for <0.94
            {
                VariableList = new XmlVariableList(project.Element(XmlConstants.Variables));
            }
            else //for >=0.94 (the android team promised)
            {
                VariableList = new XmlVariableList(project.Element(XmlConstants.Data));
            }

            LoadReference();
            LoadBroadcastMessages();

            foreach (var a in VariableList.ObjectVariableList.ObjectVariableEntries)
            {
                a.Sprite.Variables = a.VariableList;
            }
        }
示例#2
0
        protected override sealed void LoadFromXml(string xml)
        {
            var document = XDocument.Load(new StringReader(xml));
            document.Declaration = new XDeclaration("1.0", "UTF-8", "yes");

            XmlParserTempProjectHelper.Program = this;

           var project = document.Element(XmlConstants.Program);
            ProgramHeader = new XmlProjectHeader(project.Element(XmlConstants.Header));
            SpriteList = new XmlSpriteList(project.Element(XmlConstants.ObjectList));
            if(project.Element(XmlConstants.Variables) != null) //for <0.94
                VariableList = new XmlVariableList(project.Element(XmlConstants.Variables));
            else //for >=0.94 (the android team promised)
                VariableList = new XmlVariableList(project.Element(XmlConstants.Data));

            LoadReference();
            LoadBroadcastMessages();

            foreach (var a in VariableList.ObjectVariableList.ObjectVariableEntries)
            {
                a.Sprite.Variables = a.VariableList;
            }
        }
示例#3
0
 public XmlProgram()
 {
     SpriteList = new XmlSpriteList();
     BroadcastMessages = new List<string>();
     VariableList = new XmlVariableList();
 }
 public XmlProgram()
 {
     SpriteList        = new XmlSpriteList();
     BroadcastMessages = new List <string>();
     VariableList      = new XmlVariableList();
 }