public void EquipSlotRightClicked(EquipSlot slot) { Debug.Log("Equip slot right clicked"); if (slot.Equipment() != null) { slot.EquipmentManager().FastUnequip(slot.Equipment()); } }
//HELPERS public void PickUpItemIntoEmptyMouseSlot(MouseSlot mouseSlot, EquipSlot slot) { Debug.Log("PICK UP ITEM INTO EMPTY MOUSE SLOT"); //or equipment == naked or unarmed? Item previousItem = slot.Equipment(); //save a copy of the slotItem slot.EquipmentManager().Unequip(previousItem.myEquipSlot); //unequip item currently in equip slot mouseSlot.UpdateItem(previousItem); //place previous item in the mouseSlot (as an item)? }
public void PlaceItemInEmptySlot(MouseSlot mouseSlot, EquipSlot slot) { Item mouseItem = mouseSlot.Item(); //make sure equipment would be going in the correct slot if (!CheckEquipSlot(mouseItem.myEquipSlot, slot)) { return; } Debug.Log("PLACING ITEM IN EMPTY SLOT"); slot.EquipmentManager().Equip(mouseItem); mouseSlot.UpdateItem(null); //clear mouseSlot's item }
public void SwapItems(MouseSlot mouseSlot, EquipSlot slot) { Item mouseItem = mouseSlot.Item(); //make sure equipment would be going in the correct slot if (!CheckEquipSlot(mouseItem.myEquipSlot, slot)) { return; } Debug.Log("SWAPPING ITEMS"); Item previousItem = slot.Equipment(); //save a copy of the slotItem slot.EquipmentManager().Equip(mouseItem); mouseSlot.UpdateItem(previousItem); //add old item to mouseSlot }