コード例 #1
0
        /// <summary>
        /// Unload a scene / clear all entities
        /// </summary>
        public void UnloadScene()
        {
            foreach (var system in this._activeScene.Systems)
            {
                system.Value.OnDisable();
            }

            _activeScene = new Core.Scene();
        }
コード例 #2
0
        /// <summary>
        /// Load a specific scene
        /// </summary>
        /// <param name="scene">Scene to load</param>
        public void LoadScene(Core.Scene scene)
        {
            if (_activeScene != null && _activeScene != new Core.Scene())
            {
                UnloadScene();
            }

            _activeScene = scene;
            foreach (var system in this._activeScene.Systems)
            {
                system.Value.OnEnable();
            }
        }