Beispiel #1
0
        void Trade()
        {
            var order = new HarborOrder(TradeView.DataSource);

            if (Player.CanBuy(order))
            {
                Harbor.Sell(order);
                Player.Buy(order);
            }
            else
            {
                var message = string.Format("Not enough money to buy items. Available: {0}; Required: {1}", Player.Money, order.Total());
                NotifyTemplate.Clone().Show(message, customHideDelay: 3f, sequenceType: NotifySequence.First, clearSequence: true);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Updates the total.
        /// </summary>
        public void UpdateTotal()
        {
            var order = new HarborOrder(TradeView.DataSource);

            TradeTotal.text = order.Total().ToString();
        }