public void UpdateTandO() { txtname.text = hexType.ToString(); kind.text = "Terrain"; if ((sprite = Resources.Load("Image/galleryThings/terrain/" + hexType.ToString(), typeof(Sprite)) as Sprite) != null) { image.sprite = sprite; } otherData = otherDescriptionReader.GetTerrainData(hexType); story.text = otherData.description; effect.text = otherData.effect; }
public OtherData GetTerrainData(HexType terrain) { // TODO: parser here OtherData data = new OtherData(); string xpath = "/terrain/" + terrain.ToString(); XmlElement node = (XmlElement)xmlDocTerrain.SelectSingleNode(xpath); if (node == null) { Debug.Log("On OtherDescriptionReader GetTerrainData: " + terrain.ToString() + " not found"); return(null); } data.description = node["description"].InnerXml; data.effect = node["effect"].InnerXml; return(data); }