예제 #1
0
 public void Setup(ShopItem currentItem, ShopScrollList currentScrollList)
 {
     item             = currentItem;
     nameLabel.text   = item.itemName;
     priceLabel.text  = item.price.ToString();
     iconImage.sprite = item.icon;
     scrollList       = currentScrollList;
 }
예제 #2
0
 public void SetScrollList(ShopScrollList shopScrollList)
 {
     scrollList = shopScrollList;
     if (scrollList)
     {
         transform.SetParent(scrollList.contentPanel);
         transform.localScale = Vector3.one;
     }
     else
     {
         transform.SetParent(null);
     }
 }