示例#1
0
    public void Setup(bool isCity, Town town)
    {
        this.town = town;

        economicLevel = isCity ? cityStartingEconLevel : townStartingEconLevel;

        goodsForSale = new DailyReplenishingAsset(MaxGoodsForEconomicLevel(economicLevel), daysToReplenishGoods, gameDate);

        GlobalEvents.GoodsSoldEvent      += PlayerSoldGoods;
        GlobalEvents.GoodsPurchasedEvent += PlayerPurchasedGoods;
    }
    public void Setup(Inventory inventory, Town myTown)
    {
        this.inventory      = inventory;
        this.myTown         = myTown;
        tradeGoodsAvailable = myTown.economy.goodsForSale;

        SetupButtons();
        inventory.GoldChangedEvent += UpdateEverything;
        tradeGoodsAvailable.goodsPurchasedEvent += UpdateEverything;

        UpdateToSuggested();
        UpdateState();
    }