private void UpdatePanel() { if (currentHex.building == null) { buildingStatus.gameObject.SetActive(false); terrainStatus.gameObject.SetActive(true); if ((sprite = Resources.Load("Image/galleryThings/terrain/" + currentHex.hexType.ToString(), typeof(Sprite)) as Sprite) != null) { imgTerrain.sprite = sprite; } otherData = otherDescriptionReader.GetTerrainData(currentHex.hexType); txtTerrainDescription.text = otherData.effect; txtName.text = currentHex.hexType.ToString(); } else { buildingStatus.gameObject.SetActive(true); terrainStatus.gameObject.SetActive(false); buttonUse.gameObject.SetActive(currentHex.building.GetBuildingType() == BuildingType.Altar?true:false); if ((sprite = Resources.Load("Image/galleryThings/buildings/" + currentHex.building.GetBuildingType().ToString(), typeof(Sprite)) as Sprite) != null) { imgBuilding.sprite = sprite; } txtBuildingLevel.text = "." + currentHex.building.GetCurrentLevel(); txtBuildingDescription.text = "<size=22>" + currentHex.building.GetDescription() + "</size>"; txtName.text = currentHex.building.GetBuildingType().ToString(); txtHP.text = currentHex.building.GetCurrentHP() + "/" + currentHex.building.GetMaxHP(); } }
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; }