public void UpdateBuilding() { name.text = buildingType.ToString(); /*effect.text=""; * list=Building.GetValidProduct(buildingType); * if(list.Count==0) * { * for(int j=1;j<=Building.GetMaxLevel(buildingType);j++) * effect.text+="Lv."+j+" "+Building.GetDescription(buildingType,ItemType.NUM,j)+"\n"; * } * else * { * for(int i=0;i<list.Count;i++) * { * for(int j=1;j<=Building.GetMaxLevel(buildingType);j++) * effect.text+="Lv."+j+" "+Building.GetDescription(buildingType,list[i],j)+"\n"; * } * }*/ if ((sprite = Resources.Load("Image/galleryThings/buildings/" + buildingType.ToString(), typeof(Sprite)) as Sprite) != null) { image.sprite = sprite; } otherData = otherDescriptionReader.GetBuildingData(buildingType); story.text = otherData.description; effect.text = otherData.effect; }
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; }