public void UpdateCard(MerchantItemData focusData, int ownedCount) { ClearCard(); focusItem = focusData; CharacterData characterData = CharacterBuilder.Instance.GetCharacterData(focusData.characterId); int coins = PlayerData.Instance.coins; bool canPurchase = coins >= characterData.cost; UpdatePortrait(characterData.sprite, characterData.cost); UpdateHeader(characterData.name, ownedCount, characterData.description); UpdateButtons(canPurchase); }
public void AddItem(MerchantItemData item) { _items.Add(item); }