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(); }
private void Update() { if (Input.GetMouseButtonDown(1)) { if (itemList) { if (!showList) { itemList.OpenItemList(); showList = true; } else { itemList.CloseItemList(); showList = false; } } } }