Exemplo n.º 1
-1
 public void CloseScene()
 {
     Globals.Instance.ActorMgr.ClearActor();
     Globals.Instance.GameMgr.ClearSpeedMod();
     if (this.sceneInfo == null)
     {
         return;
     }
     Application.LoadLevel("Empty");
     Res.ForceUnloadAssets(false);
     GameUIManager.mInstance.DestroyHUDTextManager();
     this.sceneInfo = null;
     this.senceState = SceneManager.SenceState.Unknown;
 }
Exemplo n.º 2
-1
 private IEnumerator DoLoadScene(SceneInfo _senceInfo)
 {
     this.senceState = SenceState.PrepareLoad;
     progress = 0f;
     OnSencePreLoad(_senceInfo);
     Res.LoadScene(_senceInfo.ResLoc);
     AsyncIO = Application.LoadLevelAdditiveAsync(_senceInfo.ResLoc);
     senceState = SenceState.Loading;
     while(!AsyncIO.isDone)
     {
         progress = AsyncIO.progress * 0.96f;
         yield return 0;
     }
     AsyncIO = null;
     sceneInfo = _senceInfo;
     senceState = SceneManager.SenceState.Loaded;
     yield return new WaitForEndOfFrame();
     OnSencePreLoaded();
     while(!Globals.Instance.ResourceCache.IsAllResourceLoaded())
     {
         yield return new WaitForEndOfFrame();
     }
     SceneManager.DoGCCollect();
     OnSenceLoaded();
     LoadSceneCoroutine = null;
     progress = 1f;
 }
Exemplo n.º 3
-1
 private void Awake()
 {
     this.sceneInfo = null;
     this.senceState = SceneManager.SenceState.Unknown;
 }