Example #1
0
        public void LoadXml(XmlNode node, Area area)
        {
            Name             = node["Name"].InnerText;
            Description      = node["Description"].InnerText;
            shortDescription = node["ShortDescription"].InnerText;
            Tag  = node["Tag"].InnerText;
            Area = area;
            var exitsNode = node.SelectSingleNode("Exits");

            if (exitsNode != null)
            {
                XmlNodeList exits = node["Exits"].SelectNodes("Exit");
                foreach (XmlNode exit in exits)
                {
                    Exit newExit = new Exit();
                    newExit.LoadXml(exit, this);
                    Exits.Add(newExit);
                }
            }
        }
Example #2
0
 public void LoadXml(XmlNode node, Area area)
 {
     Name = node["Name"].InnerText;
     Description = node["Description"].InnerText;
     shortDescription = node["ShortDescription"].InnerText;
     Tag = node["Tag"].InnerText;
     Area = area;
     var exitsNode = node.SelectSingleNode("Exits");
     if (exitsNode != null) {
         XmlNodeList exits = node["Exits"].SelectNodes("Exit");
         foreach (XmlNode exit in exits) {
             Exit newExit = new Exit();
             newExit.LoadXml(exit, this);
             Exits.Add(newExit);
         }
     }
 }