예제 #1
0
        public List <ClassObject> ParseXML(TextAsset textAsset)
        {
            List <ClassObject> result = new List <ClassObject>();

            XmlDocument xmlDoc = new XmlDocument();

            xmlDoc.LoadXml(textAsset.text);

            XmlNode     root        = xmlDoc.SelectSingleNode("Classes");
            XmlNodeList assignments = root.SelectNodes("Class");

            foreach (XmlNode node in assignments)
            {
                ClassObject newAss = new ClassObject();
                newAss.id    = IntParseNode(node, "@id");
                newAss.title = node.InnerText;
                result.Add(newAss);
            }

            return(result);
        }
예제 #2
0
        protected void UpdateCardContents(int id)
        {
            ClassObject myClass = infoCard.myViewer.classSystem.classList.Find(cl => cl.id == id);

            title.text = myClass.title;
        }