protected override void Draw(GameTime gameTime) { ///MOVE RENDERTARGET TO DIFFERNET CLASS GraphicsDevice.Clear(Color.Black); InActiveEntityDrawManager.SendToRenderSystem(); ActiveEntityDrawManager.SendToRenderSystem(); RenderTarget2D GameRenderTarget = new RenderTarget2D(GraphicsDevice, 512, 512); GraphicsDevice.SetRenderTarget(GameRenderTarget); GraphicsDevice.Clear(Color.Black); SpriteBatch RenderspriteBatch = new SpriteBatch(GraphicsDevice); RenderSprites.Draw(RenderspriteBatch, GraphicsDevice); GraphicsDevice.SetRenderTarget(null); spriteBatch.Begin(); spriteBatch.Draw(GameRenderTarget, new Vector2(0, 0), Color.White); spriteBatch.End(); base.Draw(gameTime); }
public Grid(GameTexture GridTexture, Position GridPosition, bool isInCameraWorld) : base(isInCameraWorld) { GamePosition = new Position(GridPosition.Location.X, GridPosition.Location.Y); Graphic = new Sprite(GridTexture, GamePosition, 1.0f); InActiveEntityDrawManager.AddToRenderQueue(this); }