Ejemplo n.º 1
0
    //Resets the positions to the checkpoint of the winning player, then starts a new round
    private void Reset(int winningPlayer)
    {
        if (winningPlayer == 1)
        {
            respawnPoint = latestCheckPoint1.GetComponent <Checkpoint>();
        }
        else
        {
            respawnPoint = latestCheckPoint2.GetComponent <Checkpoint>();
        }

        car1.ResetPosition(respawnPoint.spawn1);
        car2.ResetPosition(respawnPoint.spawn2);

        car1._camera.GetComponent <Grayscale>().enabled = false;
        car2._camera.GetComponent <Grayscale>().enabled = false;

        winText1.text = "";
        winText2.text = "";
    }