Exemple #1
0
 public void EquipSlotRightClicked(EquipSlot slot)
 {
     Debug.Log("Equip slot right clicked");
     if (slot.Equipment() != null)
     {
         slot.EquipmentManager().FastUnequip(slot.Equipment());
     }
 }
Exemple #2
0
    //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)?
    }
Exemple #3
0
    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
    }
Exemple #4
0
    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
    }