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