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); }
public static void setAbilities() { XmlDocument l_xmlDocument = new XmlDocument(); l_xmlDocument.Load("XML Data/ClassesData.xml"); foreach (ChampionClass l_class in ClassesData.availableClasses()) { XmlNodeList l_abilityList = l_xmlDocument.SelectNodes("/ClassesData/Abilities/" + l_class.getName()); string l_trimmedAbility; for (int i = 0; i < l_abilityList.Count; i++) { l_trimmedAbility = l_abilityList[i].InnerText.Trim(); if (l_trimmedAbility.Equals("")) { continue; } l_class.addAbility(AbilitiesData.getAbility(l_trimmedAbility)); } } l_xmlDocument.Load("XML Data/RacesData.xml"); foreach (ChampionRace l_race in RacesData.availableRaces()) { XmlNodeList l_abilityList = l_xmlDocument.SelectNodes("/RacesData/Abilities/" + l_race.getName()); string l_trimmedAbility; for (int i = 0; i < l_abilityList.Count; i++) { l_trimmedAbility = l_abilityList[i].InnerText.Trim(); if (l_trimmedAbility.Equals("")) { continue; } l_race.addAbility(AbilitiesData.getAbility(l_trimmedAbility)); } } }