Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static class LoadWorldFromXML
- {
- public static List<Location> Load(TextAsset rawFile)
- {
- List<Location> world = new List<Location>();
- XmlDocument worldFile = new XmlDocument();
- worldFile.LoadXml(rawFile.text);
- // Starting with the location, start filtering through the whole world.
- XmlNodeList locationNodes = worldFile.GetElementsByTagName("LOCATION");
- foreach (XmlNode loc in locationNodes)
- {
- string locationTag = "";
- string locationTitle = "";
- string locationBackground = "";
- string locationDescription = "";
- List<LocationOption> locationOptions = new List<LocationOption>();
- XmlNodeList locationContent = loc.ChildNodes;
- foreach (XmlNode locationItem in locationContent)
- {
- Debug.Log(locationItem.ToString());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement