Beispiel #1
0
    IEnumerator OnLevelWasLoaded2Part2()
    {
        //System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch ();
        //sw.Start ();

        //CreateMyTownUnit(); // take 1.9 sec, // prev location, but move to OnLevelWasLoaded2Part1
        //StartCoroutine (CreateMyTownUnitAsync ());

        while (!bLoadedMyTownUnit)           //yield return StartCoroutine (CreateMyTownUnitAsync ()); // CreateMyTownUnit();
        {
            yield return(null);
        }



        UIMgr.instance.UICamera.enabled = false;
        //UnityEngine.Debug.Log ("<color=green>[StopWatch]</color> OnLevelWasLoaded2Part2 5: " + sw.ElapsedMilliseconds / 1000f);

        //TownNpcMgr.instance.Init(); // 원래 순서는 여기

        ShaderHelper.InitMapPostProcess(LayerMask.NameToLayer("Obstacle"), "Custom/DiffuseAlpha", "_Texture");

        UIMgr.OpenTown();

        //sendQueryForHeroAndTown(); // 원래 순서는 여기

        //LoadOtherPlayers(); // 원래 순서는 여기

        MissionLoad();

        //UnityEngine.Debug.Log ("<color=green>[StopWatch]</color> OnLevelWasLoaded2Part2 20: " + sw.ElapsedMilliseconds / 1000f);

        //MapEnvironmentSetting(Application.loadedLevelName); // // 원래 순서는 여기

        //라이트셋팅
        setShadowStrength();

        //NetworkClient.instance.SendPMsgMapEnterMapReadyC(); // 원래 순서는 여기

        SceneManager.instance.LoadingTipPanel.changeLoadingBar(1f);

        //< 패널들을 미리 로드시켜놓음
        StartCoroutine(TownUILoadUpdate());         // face, head..loadingTip off

        //UnityEngine.Debug.Log ("<color=green>[StopWatch]</color> OnLevelWasLoaded2Part2 30: " + sw.ElapsedMilliseconds / 1000f);

        if (InputManager.instance != null)
        {
        }                                    //일단 생성

        StartCoroutine(DoLater());           // TownNpcMgr.init, LoadOtherPlayers, SendPMsgMapEnterMapReadyC

        StartCoroutine(LoadAddtiveTownScene());

        StartCoroutine(WaitAndStartTutorial());

        //UnityEngine.Debug.Log ("<color=green>[StopWatch]</color> OnLevelWasLoaded2Part2 end:" + sw.ElapsedMilliseconds / 1000f);
        //sw.Stop ();
    }