Пример #1
0
    /// <summary>
    ///
    /// </summary>
    public void LoadLevel(string level)
    {
        bl_SceneLoaderInfo sli = Manager.GetSceneInfo(level);

        if (sli == null)
        {
            return;
        }

        SetupUI(sli);
        StartCoroutine(StartAsyncOperation(sli.SceneName));
    }
Пример #2
0
    /// <summary>
    ///
    /// </summary>
    public void LoadLevel(string level)
    {
        CurrentLoadLevel = Manager.GetSceneInfo(level);
        if (CurrentLoadLevel == null)
        {
            return;
        }

        SetupUI(CurrentLoadLevel);
        StartCoroutine(StartAsyncOperation(CurrentLoadLevel.SceneName));
        if (CurrentLoadLevel.LoadingType == LoadingType.Fake)
        {
            StartCoroutine(StartFakeLoading());
        }
    }
Пример #3
0
    /// <summary>
    /// Start to loading a scene
    /// </summary>
    /// <param name="level">The scene name</param>
    public void LoadLevel(string level)
    {
        //get the scene info from the SceneLoaderManager
        CurrentLoadLevel = Manager.GetSceneInfo(level);
        if (CurrentLoadLevel == null)
        {
            return;
        }

        //Setup the UI with the scene info
        ScreenUI.SetupUIForScene(CurrentLoadLevel);
        //start load the scene asynchronously doesn't matter if use fake time
        StartCoroutine(DoAsyncOperation(CurrentLoadLevel.SceneName));
        //if fake time is used, don't load the scene until the fake time passed
        if (CurrentLoadLevel.LoadingType == LoadingType.Fake)
        {
            StartCoroutine(StartFakeLoading());
        }
    }