Пример #1
0
 // Update is called once per frame
 void Update()
 {
     foreach (Hand hand in Player.instance.hands)
     {
         try
         {
             ISpell spell = hand.hoveringInteractable.gameObject.GetComponent <ISpell>();
             if (hand.GetGrabStarting() != GrabTypes.None)
             {
                 spell.Prepare();
             }
             else if (hand.GetGrabEnding() != GrabTypes.None)
             {
                 spell.Execute();
                 runeParticles.Stop();
                 runeParticles.Play();
             }
         }
         catch (System.Exception)
         {
             Debug.Log("no spell active");
         }
     }
 }