Пример #1
0
 private void Trigger()
 {
     if (eventToTrigger != null)
     {
         eventToTrigger.Trigger();
     }
 }
Пример #2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Player"))
     {
         player.position = objToTeleportTo.position;
         if (eventToTrigger != null)
         {
             eventToTrigger.Trigger();
         }
     }
 }