Beispiel #1
0
    public void SwapItems(MouseSlot mouseSlot, InventorySlot slot)
    {
        Item mouseItem    = mouseSlot.Item();
        Item previousItem = slot.Item();

        Debug.Log("SWAPPING " + mouseSlot.Item().name + " with " + slot.Item().name);
        mouseItem.mySlotNum = slot.slotNum; //assign item's slotNum to this slot
        inv.AddToSpecificSlot(mouseItem);   //drop item in slot, removing old item is taken care of here too
        mouseSlot.UpdateItem(previousItem); //add old item to mouseSlot
    }
Beispiel #2
0
    public void PlaceItemInEmptySlot(MouseSlot mouseSlot, InventorySlot slot)
    {
        Item mouseItem = mouseSlot.Item();

        Debug.Log("PLACING ITEM IN EMPTY SLOT");
        mouseItem.mySlotNum = slot.slotNum; //assign item's slotNum to this slot
        inv.AddToSpecificSlot(mouseItem);   //drop item in slot
        mouseSlot.UpdateItem(null);         //clear mouseSlot's item
    }
Beispiel #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
    }
Beispiel #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
    }