private void LoadShelves(XmlDocument xDoc) { XmlNodeList verticalShelves = xDoc.GetElementsByTagName("VerticalShelve"); for (int i = 0; i < verticalShelves.Count; i++) { LevelObject obj = new LevelObject(_content, Int32.Parse(verticalShelves[i].FirstChild.InnerText), Int32.Parse(verticalShelves[i].LastChild.InnerText), "shelfVertical"); shelves.Add(obj); } XmlNodeList horizontalShelves = xDoc.GetElementsByTagName("HorizontalShelve"); for (int i = 0; i < horizontalShelves.Count; i++) { LevelObject obj = new LevelObject(_content, Int32.Parse(horizontalShelves[i].FirstChild.InnerText), Int32.Parse(horizontalShelves[i].LastChild.InnerText), "shelf"); shelves.Add(obj); } }
private void LoadCashier(XmlDocument xDoc) { XmlNodeList cashierEl = xDoc.GetElementsByTagName("Cashier"); cashier = new LevelObject(_content, Int32.Parse(cashierEl[0].FirstChild.InnerText), Int32.Parse(cashierEl[0].LastChild.InnerText), "cashier"); }