예제 #1
0
        private void AddItemImage(ItemInfo itemAdded)
        {
            GameObject itemObject = GameObject.Instantiate(ItemImagePrefab, ItemsGroup.transform);
            ItemImage  itemImage  = itemObject.GetComponent <ItemImage>();

            itemImage.SetItem(itemAdded);
            itemImage.SetSprite(itemAdded.Sprite);
            itemImage.SetQuantityText(itemAdded.Quantity);

            ItemImages.Add(itemImage);
        }
예제 #2
0
        private void UpdateItemImage(ItemInfo itemUpdated)
        {
            ItemImage itemImage = GetItemImage(itemUpdated);

            itemImage.SetQuantityText(itemUpdated.Quantity);
        }