public void AddAmount(int amount = 1) { transform.localScale = animationScale; this.M_Amount += amount; if (M_Item.M_Capacity > 1) { M_AmountText.text = M_Amount.ToString(); } else { M_AmountText.text = ""; } }
public void SetItem(Item item, int amount = 1) { transform.localScale = animationScale; this.M_Item = item; this.M_Amount = amount; M_ItemImage.sprite = Resources.Load <Sprite>(item.M_Sprite); if (this.M_Item.M_Capacity > 1) { M_AmountText.text = M_Amount.ToString(); } else { M_AmountText.text = ""; } }