public void AddEffect(int quantity, Item item, CardButton cardButton) { if (quantity == 0) { Debug.LogWarning("Tried to add an effect with 0 quantity"); return; } string text = ""; text += (quantity > 0 ? "+" : "") + quantity; CardEffectLine line = Instantiate(cardEffectLinePrefab, transform); line.SetEffect(text, item, cardButton); }
public void AddEffect(string effect) { CardEffectLine line = Instantiate(cardEffectLinePrefab, transform); line.SetEffect(effect); }