Esempio n. 1
0
    private IEnumerator LevelEnd()
    {
        GameObject sceneManager = GameObject.Find("SceneManager");

        if (sceneManager != null)
        {
            ManagingScenes mScenes = sceneManager.GetComponent <ManagingScenes>();
            mScenes.FindScores(parentCharacters);
        }

        while (!EndLevelCamera.cam.MovingOn)
        {
            yield return(null);
        }

        FadeInOut.screen.FadeOut();

        yield return(new WaitForSeconds(FadeInOut.screen.SetTime));

        if (sceneManager != null)
        {
            ManagingScenes mScenes = sceneManager.GetComponent <ManagingScenes>();
            mScenes.Endlevel(levelScene);
        }
    }
Esempio n. 2
0
    private IEnumerator LevelQuit()
    {
        FadeInOut.screen.FadeOut();

        yield return(new WaitForSeconds(FadeInOut.screen.SetTime));

        GameObject sceneManager = GameObject.Find("SceneManager");

        if (sceneManager != null)
        {
            ManagingScenes mScenes = sceneManager.GetComponent <ManagingScenes>();
            mScenes.Endlevel(levelScene);
        }
    }