Beispiel #1
0
        private void UpdateEquipPending(ItemImage selectedItemImage, ItemInfo selectedItem)
        {
            if (PendingEquippedItem != null)
            {
                ItemImage previousEquippedImage = GetItemImage(PendingEquippedItem);
                previousEquippedImage.SetSprite(PendingEquippedItem.Sprite);
            }
            selectedItemImage.SetSprite(selectedItem.EquippedSprite);

            PendingEquippedItem = selectedItem;
        }
Beispiel #2
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);
        }
Beispiel #3
0
        private void UpdateUnequipPending(ItemImage selectedItemImage, ItemInfo selectedItem)
        {
            selectedItemImage.SetSprite(selectedItem.Sprite);

            PendingEquippedItem = null;
        }