Exemple #1
0
    public void UpdateBtn(GameState game)
    {
        int price = farmType.GetPrice(game.GetFarmCount(farmType));

        buildFarmBtn.interactable = (game.GetCookieNum() >= price);
        priceText.text            = FormatString.FormatNumber(price);
    }
Exemple #2
0
    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();
    }