示例#1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Player"))
     {
         if (cm.CheckCheckpoints() && !finished)
         {
             if (currentLap == lapsToRun)
             {
                 finish.Invoke();
             }
             else
             {
                 currentLap++;
                 cm.NextLap();
                 lm.SetLapCount(lapsToRun, currentLap);
             }
         }
     }
 }