Пример #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.tag == "BlueRune" || other.gameObject.tag == "RedRune" || other.gameObject.tag == "GreenRune" || other.gameObject.tag == "Rune")
     {
         if (PickedUpItem == false)
         {
             Rune tempRune = other.GetComponent <Rune>();
             foreach (ItemSlot IS in ItemSlots)
             {
                 if (IS.ItemHeld == false)
                 {
                     PickedUpItem = true;
                     IS.SetItem(tempRune.GetItemPrefab());
                     break;
                 }
             }
             tempRune.TurnOffRune();
         }
     }
 }