Пример #1
0
 public override void load()
 {
     Loader.loadSettings("settings");
     Game.getInstance().m_camera.load();
     ClassesData.load();
     RacesData.load();
     ElementsData.load();
     AbilitiesData.load();
     XMLParser.setAbilities();
     m_gameGui.load();
     createTileMap(20, 20);
 }
Пример #2
0
        public static void loadElementProperties(List <Element> a_elementList)
        {
            XmlDocument l_xmlDocument = new XmlDocument();

            l_xmlDocument.Load("XML Data/ElementsData.xml");

            foreach (Element l_element in a_elementList)
            {
                XmlNodeList l_propertyList = l_xmlDocument.SelectNodes("ElementsData/" + l_element.getName() + "/Strength");
                foreach (XmlNode l_node in l_propertyList)
                {
                    l_element.addStrength(ElementsData.getElement(l_node.NextSibling.InnerText.Trim()));
                }

                l_propertyList = l_xmlDocument.SelectNodes("ElementsData/" + l_element.getName() + "/Weakness");
                foreach (XmlNode l_node in l_propertyList)
                {
                    l_element.addWeakness(ElementsData.getElement(l_node.NextSibling.InnerText.Trim()));
                }
            }
        }