Ejemplo n.º 1
0
 private void OnTriggerEnter(Collider other)
 {
     // save respawn points
     if (other.CompareTag("RespawnZone"))
     {
         lasRespawnZone = other.gameObject;
     }
     // save checkpoints
     if (other.CompareTag("CheckpointZone"))
     {
         raceController.HitCheckpoint(other.gameObject);
     }
     // check death
     if (other.gameObject.CompareTag("KillZone"))
     {
         ResetKart();
     }
 }