private void OnTriggerEnter(Collider other)
 {
     if (!IsInteractable || !other.CompareTag("Player"))
     {
         return;
     }
     Interaction();
     OnDestroyChange?.Invoke(this);
     Destroy(gameObject);
 }
예제 #2
0
 private void OnTriggerEnter(Collider other)
 {
     if (!IsInteractable || !other.CompareTag("Player"))
     {
         return;
     }
     _player = other.GetComponent <Player>();
     Interaction();
     if (!_isHole)
     {
         OnDestroyChange?.Invoke(this);
         Destroy(gameObject);
     }
 }