예제 #1
0
    public void EquipItem(Item item)
    {
        Debug.Log("Equipping item: item in itemSlot " + currentItemSlot.itemSlotNumber);
        UnequipItem();
        currentItemSlot.EquipItem(item.MakeCopy());//deep copying
        List <string> possibleActives = new List <string>()
        {
            "SkirmishersSabre", "GargoyleStonePlate",
            "HextechGLP_800", "HextechGunblade", "HextechProtobelt_01", "ShurelyasReverie", "Spellbinder"
        };

        foreach (string active in possibleActives)
        {
            if (item.strName == active)
            {
                currentItemSlot.owner.LearnNewSpell(active);
            }
        }

        itemList.CloseItemList();
    }
예제 #2
0
 private void Update()
 {
     if (Input.GetMouseButtonDown(1))
     {
         if (itemList)
         {
             if (!showList)
             {
                 itemList.OpenItemList();
                 showList = true;
             }
             else
             {
                 itemList.CloseItemList();
                 showList = false;
             }
         }
     }
 }