Esempio n. 1
0
 public void Draw(GameTime gameTime, IDrawableEntity drawableEntity)
 => _spriteBatchService.Draw(drawableEntity.Texture, drawableEntity.Position, drawableEntity.Color);
Esempio n. 2
0
 /// <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);
 }
Esempio n. 3
0
 /// <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);
 }
Esempio n. 4
0
 /// <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);
 }