public void InventorySlotLeftClicked(InventorySlot slot) { MouseSlot mouseSlot = MouseSlot.instance; Item mouseItem = MouseSlot.instance.Item(); if (mouseItem == null && slot.Item() == null) { Debug.Log("BOTH SLOTS EMPTY"); return; } if (mouseItem == null && slot.Item() != null) { slotClickHelper.PickUpItemIntoEmptyMouseSlot(mouseSlot, slot); return; } if (mouseItem != null && slot.Item() == null) { slotClickHelper.PlaceItemInEmptySlot(mouseSlot, slot); return; } if (mouseItem != null && slot.Item() != null) { slotClickHelper.SwapItems(mouseSlot, slot); return; } }
public void EquipSlotLeftClicked(EquipSlot slot) { MouseSlot mouseSlot = MouseSlot.instance; Item mouseItem = MouseSlot.instance.Item(); if (slotClickHelper.CheckItemType() == false) { return; } if (mouseItem == null && slot.Equipment() == null) //or slot.Equipment() == naked or unarmed? { Debug.Log("BOTH SLOTS EMPTY"); return; } if (mouseItem == null && slot.Equipment() != null) { slotClickHelper.PickUpItemIntoEmptyMouseSlot(mouseSlot, slot); return; } if (mouseItem != null && slot.Equipment() == null) //or slot.Equipment() == naked or unarmed? { slotClickHelper.PlaceItemInEmptySlot(mouseSlot, slot); return; } if (mouseItem != null && slot.Equipment() != null) //or slot.Equipment() == naked or unarmed? { slotClickHelper.SwapItems(mouseSlot, slot); return; } }