clear() 공개 정적인 메소드

removes all colliders from the SpatialHash
public static clear ( ) : void
리턴 void
예제 #1
0
        internal void end()
        {
            _didSceneBegin = false;

            for (var i = 0; i < _renderers.length; i++)
            {
                _renderers.buffer[i].unload();
            }

            for (var i = 0; i < _postProcessors.length; i++)
            {
                _postProcessors.buffer[i].unload();
            }

            Core.emitter.removeObserver(CoreEvents.GraphicsDeviceReset, onGraphicsDeviceReset);
            entities.removeAllEntities();

            camera = null;
            content.Dispose();
            _sceneRenderTarget.Dispose();
            Physics.clear();

            if (_destinationRenderTarget != null)
            {
                _destinationRenderTarget.Dispose();
            }

            if (entityProcessors != null)
            {
                entityProcessors.end();
            }

            unload();
        }
예제 #2
0
        internal void end()
        {
            _didSceneBegin = false;


            Core.emitter.removeObserver(CoreEvents.GraphicsDeviceReset, onGraphicsDeviceReset);

            Physics.clear();
        }
예제 #3
0
        internal void end()
        {
            _didSceneBegin = false;

            // we kill Renderers and PostProcessors first since they rely on Entities
            for (var i = 0; i < _renderers.length; i++)
            {
                _renderers.buffer[i].unload();
            }

            for (var i = 0; i < _postProcessors.length; i++)
            {
                _postProcessors.buffer[i]._isAttachedToScene = false;
                _postProcessors.buffer[i].unload();
            }

            // now we can remove the Entities and finally the SceneComponents
            Core.emitter.removeObserver(CoreEvents.GraphicsDeviceReset, onGraphicsDeviceReset);
            entities.removeAllEntities();

            for (var i = 0; i < _sceneComponents.length; i++)
            {
                _sceneComponents.buffer[i].onRemovedFromScene();
            }
            _sceneComponents.clear();

            camera = null;
            content.Dispose();
            _sceneRenderTarget.Dispose();
            Physics.clear();

            if (_destinationRenderTarget != null)
            {
                _destinationRenderTarget.Dispose();
            }

            if (entityProcessors != null)
            {
                entityProcessors.end();
            }

            unload();
        }