Beispiel #1
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.GetComponent <Orb>() != null)
     {
         Orb orb = other.gameObject.GetComponent <Orb>();
         if (curElement == Element.fire)
         {
             orb.Ignite();
         }
         else if (curElement == Element.ice)
         {
             orb.Freeze();
         }
     }
 }