Exemple #1
0
    public static void FadeToBlack(float durationSeconds)
    {
        GameObject     camera = GameObject.Find("Camera");
        SceneDirection sd     = camera.GetComponent <SceneDirection>();

        sd.FadeToBlack(durationSeconds);
    }
Exemple #2
0
    IEnumerator DoTransition()
    {
        GameObject     camera = GameObject.Find("Main Camera");
        SceneDirection sd     = camera.GetComponent <SceneDirection>();

        sd.FadeToBlack(fadeDuration);
        yield return(new WaitForSeconds(fadeDuration));

        Globals.ResetMinerals();
        Application.LoadLevel(nextLevelName);
    }
Exemple #3
0
    IEnumerator OnMouseDown()
    {
        Globals.currentMinerals = 0;
        Globals.maxMinerals     = 0;

        SceneDirection director = GetComponent <SceneDirection>();

        director.FadeToBlack(1.0f);

        yield return(new WaitForSeconds(1.0f));

        Application.LoadLevel("Kentta0Assy");
    }