/// <summary> /// Renders the player /// </summary> /// <param name="gameTime">Game Time</param> /// <param name="batch">Batch used to render the sprite</param> public override void Render(GameTime gameTime, SpriteBatch batch, Renderer renderer) { Vector2 renderPosition = renderer.YCoordinateFlip(_position); renderPosition.Y -= _sprite.Height; _sprite.Render(gameTime, batch, renderer, renderPosition); base.Render(gameTime, batch, renderer); }
/// <summary> /// Renders the background /// </summary> /// <param name="gameTime">Game Time</param> /// <param name="batch">Batch used to render the sprite</param> public void Render(GameTime gameTime, SpriteBatch batch, Renderer renderer) { Vector2 renderPosition = renderer.YCoordinateFlip(new Vector2(0.0f, 0.0f)); renderPosition.Y -= _sprite.Height; batch.Draw(_sprite.Texture, new Rectangle((int)renderPosition.X, (int)renderPosition.Y, _sprite.Width, _sprite.Height), Color.White); }