public void Setup(ShopItem currentItem, PrinterScrollList currentScrollList) { shopItem = currentItem; nameLabel.text = shopItem.itemName; priceLabel.text = shopItem.price.ToString(); iconImage.sprite = shopItem.icon; scrollList = currentScrollList; }
private void RemoveItem(ShopItem itemToRemove, PrinterScrollList shopList) { for (int i = shopList.shopItemList.Count - 1; i >= 0; i--) { if (shopList.shopItemList[i] == itemToRemove) { shopList.shopItemList.RemoveAt(i); } } }
private void AddItem(ShopItem itemToAdd, PrinterScrollList shopList) { List <int> numItems = new List <int>() { 0, 0, 0, 0, 0 }; for (int i = 0; i < shopItemList.Count; i++) { //numItems[value]++; } shopList.shopItemList.Add(itemToAdd); }