예제 #1
0
    // Creates a fade out and fade in effect for the entire display
    IEnumerator ScreenFade()
    {
        SteamVR_Fade.Start(Color.black, 2f);

        yield return(new WaitForSeconds(4f));

        menu.gameObject.SetActive(true);
        int finalScore = numDefeated + (int)Mathf.Pow(timeAlive, 1.1f);

        menu.EndGame(GetNumDefeatedString(), GetTimeString(), finalScore);

        SteamVR_Fade.Start(Color.clear, 0.6f);
    }