void OnLevelWasLoaded(int level)
    {
        if (Application.loadedLevelName != "maintown_cutscene")
        {
            return;
        }

        ResourceMgr.Clear();

        NativeHelper.instance.DisableNavUI();

        //< 맵 로드
        IsMapLoad = true;

        SceneSetting();

        SetupMainCamera(true, GAME_MODE.NONE);

        MapEnvironmentSetting(Application.loadedLevelName);         // move to here.

        if (!SceneManager.instance.IsYieldAction)
        {
            SceneManager.instance.ShowLoadingTipPanel(false);
        }

        StartCoroutine(LoadAndPlayCutScene());
    }
Пример #2
0
    void OnLevelWasLoaded(int level)
    {
        if (Application.loadedLevelName != "maintown")
        {
            return;
        }

        System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
        sw.Start();
        long time1 = SceneManager.instance.showStopWatchTimer("MainTown scene loaded,  TownState.OnLevelWasLoaded start");

        ResourceMgr.Clear();

        bAddtiveSceneLoadFinish = false;

        NativeHelper.instance.DisableNavUI();

        TownActive = true;

        //< 인게임에서 사용했던 리소스들도 삭제
        AssetbundleLoader.ClearAssetList();
        SoundManager.instance.Clean();

        //< 맵 로드
        IsMapLoad = true;

        SceneSetting();

        SetupMainCamera(true, GAME_MODE.NONE);

        effectPool = PoolManager.Pools["Effect"];

        //CameraManager.instance.mainCamera.GetComponent<CameraMouseZoom>().SetInitPos();

        MapEnvironmentSetting(Application.loadedLevelName);         // move to here.

        sendQueryForHeroAndTown();

        // 여기서 컷씬플레이여부 비교판단 해야함.
//		if (NeedPlayTownCutScene ()) {
//			return;
//		}

        StartCoroutine(OnLevelWasLoaded2Part1());
        StartCoroutine(OnLevelWasLoaded2Part2());

        long time2 = SceneManager.instance.showStopWatchTimer("TownState.OnLevelWasLoaded end");

        Debug.Log("<color=green>[StopWatch]</color> OnLevelLoaded take time " + ((time2 - time1) / 1000f));
        sw.Stop();
    }