Exemple #1
0
    public void Update()
    {
        //display speed
        player          = car.velocity.magnitude * 3.6f;
        textPlayer.text = player.ToString("00.0" + "KM/H");

        //display laps
        lapsText.text       = "Laps : " + stats.currentLap;
        checkpointText.text = "Checkpoint : " + stats.currentCheckpoint;
        pointsText.text     = "Points : " + points;

        //Finish
        if (stats.currentLap == 3)
        {
            controller.ButtonMainMenu();
        }
    }