Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 7
0
 public void AddToLoad(ILoadingSceneConfig config)
 {
     _loadingList.Add(config);
 }