Пример #1
0
        public void Buy()
        {
            RecomputeTrade();
            TradeEvent trade = (new TradeEvent()
            {
                GoodsReceived = GoodsReceived,
                GoodsSent = GoodsSent,
                LikedThings = TheirGoods.LikedThings,
                HatedThings = TheirGoods.HatedThings,
                RareThings = TheirGoods.RareThings,
                CommonThings = TheirGoods.CommonThings,
                MoneyReceived = TheirTrades.MoneyEdit.CurrentMoney,
                MoneySent = MyTrades.MoneyEdit.CurrentMoney
            });

            OnTraded.Invoke(trade);
        }
Пример #2
0
 void dialog_OnClicked(TradeEvent e)
 {
     LastEvent = e;
 }
Пример #3
0
 void TradePanel_OnTraded(TradeEvent e)
 {
     OnTraded.Invoke(e);
     Close(ReturnStatus.Ok);
 }
Пример #4
0
 void dialog_OnClicked(TradeEvent e)
 {
     LastEvent = e;
 }
Пример #5
0
        public void DoTrade(TradeEvent trade)
        {
            PlayerFation.RemoveResources(trade.GoodsSent, Vector3.Zero, false);

            foreach (ResourceAmount resource in trade.GoodsReceived)
            {
                PlayerFation.AddResources(resource);
            }
        }
Пример #6
0
 void shoppingCart_OnItemChanged(GItem item)
 {
     TradeEvent trade = new TradeEvent() {GoodsReceived = GoodsReceived, GoodsSent = GoodsSent};
     float total = trade.GetProfit().TotalProfit;
     BuyTotal.Text = "Total Profit: " + (total).ToString("C");
 }
Пример #7
0
 protected virtual void OnOnTraded(TradeEvent e)
 {
     OnTrade handler = OnTraded;
     if (handler != null) handler(e);
 }
Пример #8
0
 void TradePanel_OnTraded(TradeEvent e)
 {
     OnTraded.Invoke(e);
     Close(ReturnStatus.Ok);
 }