Exemplo n.º 1
0
        public void UnloadMap()
        {
            // Clear our Undo/Redo Stack
            m_undoStack.Clear();

            // Clear our array of currently selected objects as well.
            m_CurrentMode.ClearSelection();

            // Unload any loaded resources and free all associated memory.
            WResourceManager.UnloadAllResources();

            // Free collision mesh resources.
            if (Map != null)
            {
                foreach (var scene in Map.SceneList)
                {
                    foreach (var collisionMesh in scene.GetChildrenOfType <WCollisionMesh>())
                    {
                        collisionMesh.ReleaseResources();
                    }
                }
            }

            m_ActorMode.DetailsViewModel.Categories = new System.Collections.Specialized.OrderedDictionary();
            m_CollisionMode.Shutdown();

            // Clear persistent lines from the last map as well.
            m_persistentLines.Clear();
            m_persistentQuads.Clear();

            m_currentMap = null;
            PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Map"));
        }
Exemplo n.º 2
0
        public void UnloadMap()
        {
            // Clear our Undo/Redo Stack
            m_undoStack.Clear();

            // Clear our array of currently selected objects as well.
            m_actorEditor.EditorSelection.ClearSelection();

            // Clear persistent lines from the last map as well.
            m_persistentLines.Clear();

            m_currentMap = null;
            PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Map"));
        }
Exemplo n.º 3
0
        public void UnloadMap()
        {
            // Clear our Undo/Redo Stack
            m_undoStack.Clear();

            // Clear our array of currently selected objects as well.
            m_CurrentMode.ClearSelection();

            m_ActorMode.DetailsViewModel.Categories = new System.Collections.Specialized.OrderedDictionary();
            m_CollisionMode.Shutdown();

            // Clear persistent lines from the last map as well.
            m_persistentLines.Clear();

            m_currentMap = null;
            PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Map"));
        }