Beispiel #1
0
        /// <summary>
        /// Loads a scene by a config.
        /// </summary>
        public static void LoadScene(this EcsWorld world, ILoadingSceneConfig config, string configName = null)
        {
            var list = new List <ILoadingSceneConfig> {
                config
            };

            LoadScenes(world, list, configName);
        }
Beispiel #2
0
        /// <summary>
        /// Loads a scene by a config and unload others scenes.
        /// </summary>
        public static void LoadScene(this EcsWorld world, ILoadingSceneConfig config, bool unloadOthers)
        {
            var list = new List <ILoadingSceneConfig> {
                config
            };

            LoadScenes(world, list, unloadOthers);
        }
Beispiel #3
0
        /// <summary>
        /// Loads a scene by a config and unload scene with a given names.
        /// </summary>
        public static void LoadScene(this EcsWorld world, ILoadingSceneConfig config, List <IAssetName> unloadScenes)
        {
            var list = new List <ILoadingSceneConfig> {
                config
            };

            LoadScenes(world, list, unloadScenes);
        }
Beispiel #4
0
        /// <summary>
        /// Loads a scene by a config.
        /// </summary>
        public static void LoadScene(this EcsWorld world, ILoadingSceneConfig config)
        {
            var list = new List <ILoadingSceneConfig> {
                config
            };

            LoadScenes(world, list);
        }
Beispiel #5
0
        /// <summary>
        /// Loads a scene by a config and unload scene with a given name.
        /// </summary>
        public static void LoadScene(this EcsWorld world, ILoadingSceneConfig config, IAssetName unloadScene)
        {
            var loadList = new List <ILoadingSceneConfig> {
                config
            };
            var unloadList = new List <IAssetName> {
                unloadScene
            };

            LoadScenes(world, loadList, unloadList);
        }
Beispiel #6
0
        public ILoadingSceneConfig RemoveFromLoadingList(string sceneName)
        {
            ILoadingSceneConfig config = null;

            for (var i = 0; i < _loadingList.Count; i++)
            {
                var cfg = _loadingList[i];

                if (cfg.Name.FullName.Equals(sceneName))
                {
                    config = cfg;
                    _loadingList.RemoveAt(i);

                    break;
                }
            }

            return(config);
        }
Beispiel #7
0
 public void AddToLoad(ILoadingSceneConfig config)
 {
     _loadingList.Add(config);
 }