예제 #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"));
        }
예제 #2
0
        public void ShutdownWorld()
        {
            System.Console.WriteLine("Shutdown World");

            // 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();
                    }
                }
            }

            foreach (var view in m_sceneViews)
            {
                view.Dispose();
            }

            m_ActorMode.Dispose();
            m_EventMode.Dispose();

            m_persistentLines.Dispose();
            m_persistentQuads.Dispose();
        }
예제 #3
0
        public void ShutdownWorld()
        {
            System.Console.WriteLine("Shutdown World");

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

            foreach (var view in m_sceneViews)
            {
                view.Dispose();
            }

            m_actorEditor.Dispose();

            m_persistentLines.Dispose();
        }