public void Draw(GameTime gameTime, IDrawableEntity drawableEntity) => _spriteBatchService.Draw(drawableEntity.Texture, drawableEntity.Position, drawableEntity.Color);
/// <summary> /// Draw the specified texture. /// </summary> /// <param name="texture">Texture.</param> /// <param name="destination">Destination.</param> /// <param name="color">Color.</param> public static void Draw(this ISpriteBatchService batch, Texture texture, Rectangle destination, Color color) { batch.Draw(texture, destination, null, color); }
/// <summary> /// Draw a texture /// </summary> /// <param name="texture">Texture to draw</param> /// <param name="position">Position of the texture</param> /// <param name="color">Global color</param> public static void Draw(this ISpriteBatchService batch, Texture texture, Vector position, Color color) { batch.Draw(texture, position, null, color, 0f, Vector.Zero, 1.0f); }
/// <summary> /// Draw the specified texture. /// </summary> /// <param name="texture">Texture.</param> /// <param name="destination">Destination.</param> /// <param name="source">Source.</param> /// <param name="color">Color.</param> public static void Draw(this ISpriteBatchService batch, Texture texture, Rectangle destination, Rectangle source, Color color) { batch.Draw(texture, destination, source, color, 0f, Vector.Zero); }