void OnControllerColliderHit(ControllerColliderHit hit)
 {
     if (hit.gameObject.CompareTag("EndZone"))
     {
         if (gameManager != null)
         {
             PowerUp = 0;
             gameManager.CompleteLevel();
         }
     }
     else if (hit.gameObject.CompareTag("DeathZone"))
     {
         if (gameManager != null)
         {
             PowerUp             = 0;
             playerCurrentHealth = 0;
             gameManager.InCompleteLevel();
         }
     }
 }
Пример #2
0
 private void OnTriggerEnter(Collider other)
 {
     gameManager.CompleteLevel();
 }