Exemple #1
0
 private void DestoyOnOutOfScreen()
 {
     if (CameraScreen.ObjectIsBehindCamera(_transform) || CameraScreen.ObjectIsUnderCamera(_transform))
     {
         gameObject.SetActive(false);
     }
 }
Exemple #2
0
 private void DestroyCheck()
 {
     if (CameraScreen.ObjectIsBehindCamera(transform) || CameraScreen.ObjectIsUnderCamera(transform))
     {
         Destroy(gameObject);
     }
 }