public void Repaint(InventoryCurrencyLookup lookup)
        {
            if (amount != null)
                amount.text = lookup.GetFormattedString(1.0f, overrideStringFormat ? overrideStringFormatString : "");

            if (icon != null)
                icon.sprite = lookup.currency.icon;

        }
 private void CurrencyChanged(float amountBefore, InventoryCurrencyLookup lookup)
 {
     if(lookup._currencyID == _currencyID)
         currencyUIElement.Repaint(lookup);
 }
 public static bool RemoveCurrency(InventoryCurrencyLookup lookup, float amountMultipier = 1.0f)
 {
     return RemoveCurrency(lookup.amount * amountMultipier, lookup.currency.ID);
 }
 public static bool CanAddCurrency(InventoryCurrencyLookup currencyLookup)
 {
     return CanAddCurrency(currencyLookup.amount, currencyLookup.currency.ID);
 }
 /// <summary>
 /// Can we remove the amount of given currency?
 /// </summary>
 /// <param name="currencyLookup"></param>
 /// <param name="allowCurrencyConversion">Allow converting a higher currency down to this currency? For example convert gold to silver.</param>
 /// <param name="checkBank"></param>
 /// <returns></returns>
 public static bool CanRemoveCurrency(InventoryCurrencyLookup currencyLookup, bool allowCurrencyConversion, bool checkBank)
 {
     return CanRemoveCurrency(currencyLookup.amount, currencyLookup.currency.ID, allowCurrencyConversion, checkBank);
 }
 public void RemoveCurrencyLookup(InventoryCurrencyLookup lookup)
 {
     lookups.Remove(lookup);
 }
 public void AddCurrencyLookup(InventoryCurrencyLookup lookup)
 {
     lookup.parentContainer = this;
     lookups.Add(lookup);
 }