// ------------------------------------------------------------------------

    public IEnumerator levelCompleted()
    {
        gui.notify("Level completed!", 3);
        yield return(new WaitForSeconds(4));

        sceneFader.endScene();
        while (sceneFader.Blending)
        {
            yield return(null);
        }
        GameObject.Find("Level").GetComponent <LevelLoader>().next();
        sceneFader.startScene();
    }
    // ------------------------------------------------------------------------

    void Awake()
    {
        gameCamera       = GameObject.Find("GameCam");
        cameraController = GameObject.Find("Controller").GetComponent <CameraController>();
        gui        = GameObject.Find("Controller").GetComponent <GUINotification>();
        sceneFader = SceneFader.create();
        sceneFader.startScene();
    }
Esempio n. 3
0
    // ------------------------------------------------------------------------

    void Start()
    {
        sceneFader = SceneFader.create();
        sceneFader.startScene();
        ar = new AspectRatio();
    }