public void UpdateBtn(GameState game) { int price = farmType.GetPrice(game.GetFarmCount(farmType)); buildFarmBtn.interactable = (game.GetCookieNum() >= price); priceText.text = FormatString.FormatNumber(price); }
public Farm(FarmType type, int farmCount) { this.type = type; for (int workerNum = 0; workerNum < workersCount; workerNum++) { Worker worker = new Worker(); workers.Add(worker); } price = type.GetPrice(farmCount); cookiePerSecond = type.GetCookiePerSecond(); }