Esempio n. 1
0
 public void LoadMap(int _no)
 {
     if (!Singleton <Info> .Instance.dicMapLoadInfo.ContainsKey(_no))
     {
         this.ReleaseMap();
     }
     else
     {
         if (this.no == _no)
         {
             return;
         }
         this.MapComponent = (MapComponent)null;
         this.isLoading    = true;
         this.no           = _no;
         Info.MapLoadInfo data = Singleton <Info> .Instance.dicMapLoadInfo[_no];
         Singleton <Scene> .Instance.LoadBaseScene(new Scene.Data()
         {
             assetBundleName = data.bundlePath,
             levelName       = data.fileName,
             fadeType        = Scene.Data.FadeType.None,
             onLoad          = (Action)(() => this.OnLoadAfter(data.fileName))
         });
     }
 }
Esempio n. 2
0
 private void SetupMap(int _no, bool _close)
 {
     this.sceneInfo.map = _no;
     this.sceneInfo.caMap.Reset();
     if (this.onChangeMap != null)
     {
         this.onChangeMap();
     }
     this.m_CameraCtrl.CloerListCollider();
     Info.MapLoadInfo mapLoadInfo = (Info.MapLoadInfo)null;
     if (Singleton <Info> .Instance.dicMapLoadInfo.TryGetValue(Singleton <Map> .Instance.no, out mapLoadInfo))
     {
         this.m_CameraCtrl.LoadVanish(mapLoadInfo.vanish.bundlePath, mapLoadInfo.vanish.fileName, Singleton <Map> .Instance.MapRoot);
     }
     if (!_close)
     {
         return;
     }
     this.rootButtonCtrl.OnClick(-1);
 }