void Start() { button = GetComponent <Button>(); button.image.sprite = off; sizeScript = prefab.GetComponent <SizeScript>(); manager = ManagerStatistic.Instance; }
private int getPrice(SizeScript sizeScript) { return(sizeScript.isOwned ? (int)(sizeScript.prize * 0.5) : sizeScript.prize * 2); }
private string getStringForBuilding(int price, SizeScript sizeScript) { return(sizeScript.isOwned ? "Funds returned: " + price.ToString() : "Destroying cost: " + price.ToString()); }