Esempio n. 1
0
    private IEnumerator LoadNextLevel()
    {
        Input.multiTouchEnabled = false;

        SetPercentDone(0);

        Optimizer.CreateSingleton();
        yield return(null);

        Debug.Log("Loading genie...");

        Ekstep.Genie.CreateSingleton();

        while (!Ekstep.Genie.instance.IsInitialized)
        {
            yield return(null);
        }

        Debug.Log("Finished loading genie...");

        if (!EnlearnInstance.CheckInstalled())
        {
            yield break;
        }

        LanguageMgr.CreateSingleton();

        FPSCounter.CreateSingleton();

        AsyncOperation loadOp = Application.LoadLevelAsync(Application.loadedLevel + 1);

        while (!loadOp.isDone)
        {
            SetPercentDone(loadOp.progress);
            yield return(null);
        }
    }