Beispiel #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Player"))
     {
         tutorialManager.CollisionWithCar();
     }
     else if (other.CompareTag("RespawnLR"))
     {
         tutorialManager.SpawnNewCar(TutorialManager.CarDirection.LeftToRight);
         Destroy(gameObject);
     }
     else if (other.CompareTag("RespawnRL"))
     {
         tutorialManager.SpawnNewCar(TutorialManager.CarDirection.RightToLeft);
         Destroy(gameObject);
     }
 }