/// <summary> /// Updates the player total. /// </summary> public void UpdatePlayerTotal() { var order = new JRPGOrder(PlayerItems.DataSource); PlayerTotal.text = order.Total().ToString(); }
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()); NotifyTemplate.Clone().Show(message, customHideDelay: 3f, sequenceType: NotifySequence.First, clearSequence: true); } }
/// <summary> /// Updates the shop total. /// </summary> public void UpdateShopTotal() { var order = new JRPGOrder(ShopItems.DataSource); ShopTotal.text = order.Total().ToString(); }