public void Setup(Item currentItem, InventoryScrollList currentScrollList, Transform popupSpawn) { this.item = currentItem; this.nameLabel.text = this.item.title; this.icon.sprite = this.item.icon; this.scrollList = currentScrollList; this.popupSpawn = popupSpawn; }
private void RemoveItem(Item itemToRemove, InventoryScrollList inventory) { for (int i = inventory.itemList.Count - 1; i >= 0; i--) { if (inventory.itemList[i] == itemToRemove) { inventory.itemList.RemoveAt(i); } } }
private void AddItem(Item itemToAdd, InventoryScrollList invetoryList) { invetoryList.itemList.Add(itemToAdd); }