Esempio n. 1
0
        private int DifferenceTablesHeroTrader(int sumCoinsHeroTableToBag, int sumCoinsTraderTableToBag)
        {
            var sumPriceHeroTable   = ApplicationTrade.GetSumPrice(InputData.HeroTable);
            var sumPriceTraderTable = ApplicationTrade.GetSumPrice(InputData.TraderTable);

            // the cost of all items on the table without coins
            var sumPriceHeroTableWithoutCoins   = sumPriceHeroTable - sumCoinsHeroTableToBag;
            var sumPriceTraderTableWithoutCoins = sumPriceTraderTable - sumCoinsTraderTableToBag;

            var differenceTablesHeroTrader = sumPriceHeroTableWithoutCoins - sumPriceTraderTableWithoutCoins;

            return(differenceTablesHeroTrader);
        }
Esempio n. 2
0
        private void UpdateSum()
        {
            var sumPrice = ApplicationTrade.GetSumPrice(_inventoryComponent);

            _sumText.text = sumPrice == 0 ? string.Empty : sumPrice + " coins";
        }