public static Sprite GetSpriteFromXml(string filename) { List<Monster> ret=new List<Monster>(); XmlData monsterFile=new XmlData(filename); List<XmlNode> sprite=monsterFile.GetElements("sprite"); return new Sprite(sprite[0]); }
public static List<Npc> GetNpcsFromXml(string filename) { List<Npc> ret=new List<Npc>(); XmlData npcfile=new XmlData(filename); List<XmlNode> npcs=npcfile.GetElements("npcs.npc"); foreach(XmlNode i in npcs) { ret.Add(new Npc(i)); } return ret; }
public static List<Map> GetMapsFromMapsXml(string filename) { List<Map> ret=new List<Map>(); XmlData mapsFile=new XmlData(filename); List<XmlNode> maps=mapsFile.GetElements("maps.map"); foreach(XmlNode i in maps) { ret.Add(new Map(i)); } return ret; }
public static List<Item> GetItemsFromItemsXml(string filename) { List<Item> ret=new List<Item>(); XmlData itemsFile=new XmlData(filename); List<XmlNode> items=itemsFile.GetElements("items.item"); foreach(XmlNode i in items) { ret.Add(new Item(i)); } return ret; }
public static List<Monster> GetMonstersFromMonsterXml(string filename) { List<Monster> ret=new List<Monster>(); XmlData monsterFile=new XmlData(filename); List<XmlNode> monsters=monsterFile.GetElements("monsters.monster"); foreach(XmlNode i in monsters) { ret.Add(new Monster(i)); } return ret; }