void OnTriggerExit(Collider col)
 {
     if (col.name == "finish line")
     {
         //count next lap
         curLap++;
         //record rank position
         if (curLap == LapController.lapCount)
         {
             lapCounter.RecordRank(transform.gameObject);
         }
     }
 }
Exemplo n.º 2
0
 void OnTriggerExit(Collider col)
 {
     if (col.tag == "Checkpoint" && checkPoints.curCheckpointPos == checkPoints.allCheckpoints.Count - 1)
     {
         //count for next lap
         curLap++;
         //record ranking position
         if (curLap == LapController.lapCount)
         {
             lapCounter.RecordRank(transform.gameObject);
             LapController.isRaceFinished = true;
         }
     }
 }