public void EquipItem(Item itemToEquip) { // EQUIP EYE if (itemToEquip.itemType == ItemType.Eye) { if (equippedEyeSlot.isFilled) { EmptyEquippedSlot(equippedEyeSlot); } equippedEyeSlot.AddItemInSlot(itemToEquip); } // EQUIP HEART else if (itemToEquip.itemType == ItemType.Heart) { if (equippedHeartSlot.isFilled) { EmptyEquippedSlot(equippedHeartSlot); } equippedHeartSlot.AddItemInSlot(itemToEquip); } // EQUIP HAND else if (itemToEquip.itemType == ItemType.Hand) { // equip hand in right slot if both slots are full if (equippedLeftHandSlot.isFilled && equippedRightHandSlot.isFilled) { EmptyEquippedSlot(equippedRightHandSlot); equippedRightHandSlot.AddItemInSlot(itemToEquip); } // equip in rights slot if it's empty else if (!equippedRightHandSlot.isFilled) { equippedRightHandSlot.AddItemInSlot(itemToEquip); } // equip hand in left slot if right slot is full else if (!equippedLeftHandSlot.isFilled) { equippedLeftHandSlot.AddItemInSlot(itemToEquip); } } }