void FadeToBlack()
{
// Lerp the colour of the texture between itself and black.
GetComponent<GUITexture>().color = Color.Lerp(GetComponent<GUITexture>().color, Color.black, timer);
if (GetComponent<GUITexture>().color.a >= 0.99f)
{
GetComponent<GUITexture>().color = Color.black;
GetComponent<GUITexture>().enabled = true;
// ... reload the level.
fadeBlack = false;
}
raceMusic.volume = 1 - GetComponent<GUITexture>().color.a;
menuMusic.volume = GetComponent<GUITexture>().color.a;
}