public void Initialize(ItemScriptables item) { Item = item; ItemText.text = item.Name; AmountWidget.Initialize(item); EquippedWidget.Initialize(item); ItemButton.onClick.AddListener(UseItem); Item.OnItemDestroyed += OnItemDestroyed; }
public void Initialize(ItemScriptable _item) { item = _item; itemText.text = item.itemName; amountWidget.Initialize(item); equipWidget.Initialize(item); itemButton.onClick.AddListener(UseItem); item.OnItemDestroyed += OnItemDestroyed; }