Example #1
0
    public void EquipItem(EquipmentSlotType slotType, Equipment equipment, bool removeToInventory = true)
    {
        if (slotType == EquipmentSlotType.None || equipment == null)
        {
            return;
        }

        TryToRemoveEquipment(slotType, removeToInventory);
        _currentEquipment[slotType] = equipment;
        EquipmentSlot slot = _player.PlayerEquipmentUI.GetEquipmentSlotByType(slotType);

        slot.RightPointerClicked += RemoveItem;
        slot.AddItemToSlot(equipment);
    }