示例#1
0
    public void Setup(ShopItem currentItem, PrinterScrollList currentScrollList)
    {
        shopItem         = currentItem;
        nameLabel.text   = shopItem.itemName;
        priceLabel.text  = shopItem.price.ToString();
        iconImage.sprite = shopItem.icon;

        scrollList = currentScrollList;
    }
示例#2
0
 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);
         }
     }
 }
示例#3
0
    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);
    }