reset() public static method

public static reset ( ) : void
return void
Ejemplo n.º 1
0
Archivo: Scene.cs Proyecto: Pyxlre/Nez
        internal void begin()
        {
            Assert.isFalse(_renderers.Count == 0, "Scene has begun with no renderer. At least one renderer must be present before beginning a scene.");
            Physics.reset();

            // prep our render textures and take care of centering the camera origin. we have to set the RenderTarget
            updateResolutionScaler();
            Core.graphicsDevice.SetRenderTarget(_sceneRenderTarget);
            camera.centerOrigin();

            if (entityProcessors != null)
            {
                entityProcessors.begin();
            }
            Core.emitter.addObserver(CoreEvents.GraphicsDeviceReset, onGraphicsDeviceReset);
        }
Ejemplo n.º 2
0
		internal void begin()
		{
			Assert.isFalse( _renderers.length == 0, "Scene has begun with no renderer. At least one renderer must be present before beginning a scene." );
			Physics.reset();

			// prep our render textures
			updateResolutionScaler();
			Core.graphicsDevice.setRenderTarget( _sceneRenderTarget );

			if( entityProcessors != null )
				entityProcessors.begin();
			Core.emitter.addObserver( CoreEvents.GraphicsDeviceReset, onGraphicsDeviceReset );

			_didSceneBegin = true;
			onStart();
		}
Ejemplo n.º 3
0
        internal void begin()
        {
            if (_renderers.length == 0)
            {
                addRenderer(new DefaultRenderer());
                Debug.warn("Scene has begun with no renderer. A DefaultRenderer was added automatically so that something is visible.");
            }

            Physics.reset();

            // prep our render textures
            updateResolutionScaler();
            Core.graphicsDevice.setRenderTarget(_sceneRenderTarget);

            if (entityProcessors != null)
            {
                entityProcessors.begin();
            }
            Core.emitter.addObserver(CoreEvents.GraphicsDeviceReset, onGraphicsDeviceReset);

            _didSceneBegin = true;
            onStart();
        }