示例#1
0
 public void Initialize(ItemScriptables item)
 {
     Item          = item;
     ItemText.text = item.Name;
     AmountWidget.Initialize(item);
     EquippedWidget.Initialize(item);
     ItemButton.onClick.AddListener(UseItem);
     Item.OnItemDestroyed += OnItemDestroyed;
 }
示例#2
0
    public void Initialize(ItemScriptable _item)
    {
        item          = _item;
        itemText.text = item.itemName;

        amountWidget.Initialize(item);
        equipWidget.Initialize(item);

        itemButton.onClick.AddListener(UseItem);
        item.OnItemDestroyed += OnItemDestroyed;
    }