public string GetRow() { var sb = new StringBuilder(); sb.Append(Name); sb.Append('\t'); sb.Append(Plural1); sb.Append('\t'); if (Creature.HasSecondPlural) { sb.Append(Plural2); sb.Append('\t'); } sb.Append(PriceLumber.ToString()); sb.Append('\t'); sb.Append(PriceMercury.ToString()); sb.Append('\t'); sb.Append(PriceOre.ToString()); sb.Append('\t'); sb.Append(PriceSulphur.ToString()); sb.Append('\t'); sb.Append(PriceCrystals.ToString()); sb.Append('\t'); sb.Append(PriceGems.ToString()); sb.Append('\t'); sb.Append(PriceGold.ToString()); sb.Append('\t'); sb.Append(FightValue.ToString()); sb.Append('\t'); sb.Append(AIValue.ToString()); sb.Append('\t'); sb.Append(Growth.ToString()); sb.Append('\t'); sb.Append(hordeGrowth.ToString()); sb.Append('\t'); sb.Append(HP.ToString()); sb.Append('\t'); sb.Append(Speed.ToString()); sb.Append('\t'); sb.Append(Attack.ToString()); sb.Append('\t'); sb.Append(Defense.ToString()); sb.Append('\t'); sb.Append(LoDamage.ToString()); sb.Append('\t'); sb.Append(HiDamage.ToString()); sb.Append('\t'); sb.Append(Arrows.ToString()); sb.Append('\t'); sb.Append(Spells.ToString()); sb.Append('\t'); sb.Append(low.ToString()); sb.Append('\t'); sb.Append(high.ToString()); sb.Append('\t'); sb.Append(Description.ToString()); sb.Append('\t'); sb.Append(attributes.ToString()); return(sb.ToString()); }
// Start is called before the first frame update void Start() { GetComponentsInChildren <Text>()[0].text = BuildingName; string txt = ""; if (PriceGold > 0) { txt += PriceGold.ToString() + " 골드"; if (PriceGarlic > 0 || PriceWater > 0) { txt += " / "; } } if (PriceGarlic > 0) { txt += "마늘 " + PriceGarlic.ToString() + "개"; if (PriceWater > 0) { txt += " / "; } } if (PriceWater > 0) { txt += "성수 " + PriceWater.ToString() + "통"; } GetComponentsInChildren <Text>()[1].text = txt; GetComponentsInChildren <Image>()[1].sprite = BuildingImage; world = GameObject.Find("World").GetComponent <World>(); }