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()); Notify.Template("NotifyTemplateSimple").Show(message, customHideDelay: 3f, sequenceType: NotifySequence.First, clearSequence: true); } }
void Sell() { var order = new JRPGOrder(PlayerItems.DataSource); if (Shop.CanBuy(order)) { Shop.Buy(order); Player.Sell(order); } else { var message = string.Format("Not enough money in shop to sell items. Available: {0}; Required: {1}", Shop.Money, order.Total()); Notify.Template("NotifyTemplateSimple").Show(message, customHideDelay: 3f, sequenceType: NotifySequence.First, clearSequence: true); } }
void Buy() { var order = new JRPGOrder(ShopItems.DataSource); if (Player.CanBuy(order)) { Shop.Sell(order); Player.Buy(order); } else { var message = string.Format("Not enough money to buy items. Available: {0}; Required: {1}", Player.Money, order.Total()); notify.Template().Show(message, customHideDelay: 3f, sequenceType: NotifySequence.First, clearSequence: true); } }