public override void GetProperties(ObjectPropertyList list) { base.GetProperties(list); list.Add(1060660, "Gold\t" + (GoldLedger?GoldAmount.ToString():"Inactive")); list.Add(1060661, "Tokens\t" + (TokenLedger?TokensAmount.ToString():"Inactive")); list.Add(1060662, "Looting\t" + LootSettingsString); //value: ~1_val~ list.Add(1060663, "Deleting\t" + (DeleteAllCorpses?"All Corpses":"Empty Corpses")); //value: ~1_val~ }
public void AddGold(Gold gold) { GoldAmount.Add(gold); if (CalculateTotallAmount() > MaxCapacity) { GoldAmount.Remove(gold); } }
private void Start() { _goldAmount = GameObject.FindWithTag(Tags.SINGLETONTAG).GetComponent <GoldAmount>(); }
public long CalculateCurrentGoldAmount() { return(GoldAmount.Select(x => x.Amount).Sum()); }