Exemplo n.º 1
0
 private void Load(SceneConfig config)
 {
     if (config.isDependency)
     {
         LoadAsync(config.sceneName);
     }
     else
     {
         var loaded = loadedScenes[config.type];
         if (loaded != config.sceneName)
         {
             if (loaded == none)
             {
                 LoadAsync(config.sceneName);
             }
             else
             {
                 Unload(loaded, delegate {
                     LoadAsync(config.sceneName);
                 });
             }
         }
         else
         {
             CheckAllLoaded();
         }
     }
 }
Exemplo n.º 2
0
 private void LoadRest(SceneConfig sceneConfig, System.Action callback)
 {
     PrepareLoad(callback);
     Load(sceneConfig);
     if (sceneConfig.dependencies != null)
     {
         foreach (var dependency in sceneConfig.dependencies)
         {
             Load(GetSceneConfig(dependency.sceneName));
         }
     }
     PrepareFinishLoad();
 }
Exemplo n.º 3
0
 private void Unload(SceneConfig config)
 {
     UnloadAsync(config.sceneName);
 }