Exemple #1
0
 private void OnTriggerExit(Collider other)
 {
     if (other.CompareTag("Player"))
     {
         _player = null;
         OnPlayerLost?.Invoke();
     }
 }
Exemple #2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Player"))
     {
         _player = other.gameObject;
         OnPlayerFound?.Invoke();
     }
 }