Ejemplo n.º 1
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="index"></param>
    public void QuickSlotActivated(int index)
    {
        print("Quickslot " + index + " clicked");

        if (settingQuickSlot)
        {
            inventoryUIRef.SetItemInQuickSlot(index);
            inventoryUIRef.ActivateChooseQuickSlot(false);
        }
        else
        {
            sEquipmentSlot slotChosen = equippedSystem.quickSlots[index];
            if (slotChosen.slotOccupied)
            {
                //Check if occupied item is already equipped. If it is, put it away
                if (slotChosen.equippedInHand)
                {
                    EquipInHand(false, index, itemInHandUIRef.bareHands);
                }
                else
                {
                    EquipInHand(true, index, slotChosen.item.item.icon, slotChosen.item.item.physicalRepresentation);
                }
            }
        }
    }
Ejemplo n.º 2
0
 private void AddItemToQuickSlot(sEquipmentSlot slot, ItemInstance item, int index)
 {
     slot.item                      = item;
     slot.slotOccupied              = true;
     quickSlots[index].item         = item;
     quickSlots[index].slotOccupied = true;
     quickSlotsUI.SetQuickSlotImg(quickSlotsUI.quickSlots[index], item.item.icon);
     print("Item added to quickslot " + index + " and occupied is " + slot.slotOccupied);
 }
Ejemplo n.º 3
0
 private void AddItemToSlot(sEquipmentSlot slot, ItemInstance item)
 {
     slot.item         = item;
     slot.slotOccupied = true;
 }