Ejemplo n.º 1
0
    //These are item functions for items that are in the CONVOY
    public void EquipConvoyItem()
    {
        CharacterInventory i = currentUnit.GetComponent <CharacterInventory>();

        //Store the old equipment to add to the convoy
        Item oldEquip = null;

        if (currentItem is Weapon)
        {
            oldEquip = i.equippedWeapon;
        }
        else if (currentItem is Armor)
        {
            oldEquip = i.equippedArmor;
        }

        i.EquipNewItem(currentItem);
        ConvoyManager.instance.RemoveItem(convoyIndex, currentItemIndex);
        ConvoyManager.instance.AddItem(oldEquip);

        //Don't need these because the equipped weapon slot is seperate from the inventory
        //i.RemoveItemByIndex(currentItemIndex);
        //i.AddItem(oldEquip);

        ResetConvoyItemOptions();
        UpdateItemInfo();
        ResetCurrentItem();

        RefreshConvoy();
    }
Ejemplo n.º 2
0
    public void EquipButton()
    {
        CharacterInventory inventory = MouseControl.instance.unitOfInterest.GetComponent <CharacterInventory>();

        inventory.RemoveItemByID(item.GetInstanceID());
        Item oldEquip = inventory.EquipNewItem(item);

        inventory.AddItem(oldEquip);

        Finish();
    }
Ejemplo n.º 3
0
    public void EquipButton()
    {
        CharacterInventory inventory = MouseControl.instance.unitOfInterest.GetComponent <CharacterInventory>();

        inventory.RemoveItemByID(currentItem.GetInstanceID());
        Item oldEquip = inventory.EquipNewItem(currentItem);

        inventory.AddItem(oldEquip);

        //Update the items
        ResetButtons();
    }
Ejemplo n.º 4
0
    public void EquipItem()
    {
        CharacterInventory i = currentUnit.GetComponent <CharacterInventory>();

        //Store the old equipment to add back to the inventory
        Item oldEquip = null;

        if (currentItem is Weapon)
        {
            oldEquip = i.equippedWeapon;
        }
        else if (currentItem is Armor)
        {
            oldEquip = i.equippedArmor;
        }

        i.EquipNewItem(currentItem);
        i.RemoveItemByIndex(currentItemIndex);
        i.AddItem(oldEquip);

        ResetItemOptions();
        UpdateItemInfo();
        ResetCurrentItem();
    }