Exemplo n.º 1
0
        /// <summary>
        /// Clears the scene.
        /// </summary>
        /// <param name="clearResources">Clear all resources too?</param>
        internal void Clear(bool clearResources)
        {
            // Clear all layers
            for (int loop = 0; loop < m_sceneLayers.Count; loop++)
            {
                SceneLayer actLayer = m_sceneLayers[loop];
                actLayer.ClearObjects();

                if (actLayer.Name != DEFAULT_LAYER_NAME)
                {
                    m_sceneLayers.RemoveAt(loop);
                    loop--;
                }
            }

            // Clears all 2D drawing layers
            m_drawing2DLayers.Clear();

            // Clear all resources
            if (clearResources)
            {
                foreach (ResourceDictionary actDictionary in m_registeredResourceDicts)
                {
                    actDictionary.Clear();
                }
                m_renderParameters.Clear();

                for (int loop = 0; loop < m_sceneLayers.Count; loop++)
                {
                    SceneLayer actLayer = m_sceneLayers[loop];
                    actLayer.ClearResources();
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Unloads all resources of the object.
        /// </summary>
        public override void UnloadResources()
        {
            base.UnloadResources();

            foreach (TexturePainterHelper actHelper in m_texturePainterHelpers)
            {
                actHelper.UnloadResources();
            }

            m_texturePainterHelpers.Clear();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Unloads all resources
        /// </summary>
        public override void UnloadResources()
        {
            base.UnloadResources();

            // Mark all local resources for unloading
            foreach (var actRenderParameters in m_renderParameters)
            {
                actRenderParameters.MarkForUnloading();
            }
            m_renderParameters.Clear();
        }
Exemplo n.º 4
0
        /// <summary>
        /// Unloads all resources of the object.
        /// </summary>
        public override void UnloadResources()
        {
            base.UnloadResources();

            m_localResources.Clear();
        }