示例#1
0
 private void Unlocks()
 {
     if (currentLap == lapDisplayUnlock)
     {
         lapDisplayCanvas.SetActive(true);
     }
     if (currentLap == timerDisplayUnlock)
     {
         lapTimer.StartTimer();
         timerCanvas.SetActive(true);
     }
     if (currentLap == bestTimeDisplayUnlock)
     {
         bestTimeCanvas.SetActive(true);
         lastLapCanvas.SetActive(true);
     }
     if (currentLap % speedIncreaseFrequency == 0)
     {
         playerKart.IncreaseMoveSpeed(speedIncrement);
         playerKart.IncreaseTurnSpeed(turnIncrement);
         StartCoroutine(ZoomOut());
     }
     if (currentLap % darkenScreenEachLevel == 0)
     {
         DarkenScreen();
     }
     if (currentLap == lightsUnlock)
     {
         kartHeadlights.SetActive(true);
     }
     if (currentLap == quitUnlock)
     {
         quitCanvas.SetActive(true);
     }
     if (currentLap == takeAwayLapCounter)
     {
         lapDisplayCanvas.SetActive(false);
     }
     if (currentLap == giveBackLapCounter)
     {
         lapDisplayCanvas.SetActive(true);
     }
     if (currentLap == takeAwayBestTimer)
     {
         bestTimeCanvas.SetActive(false);
     }
     if (currentLap == giveBackBestTimer)
     {
         bestTimeCanvas.SetActive(true);
     }
 }