Ejemplo n.º 1
0
        public static void Draw(this SpriteBatch spriteBatch, TextureRegion2D textureRegion, Vector2 position, Color color,
                                float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth)
        {
            var sourceRectangle = textureRegion.Bounds;

            spriteBatch.Draw(textureRegion.Texture, position, sourceRectangle, color, rotation, origin, scale, effects, layerDepth);
        }
Ejemplo n.º 2
0
        public static void Draw(this SpriteBatch spriteBatch, TextureRegion2D textureRegion, Vector2 position, Color color)
        {
            var sourceRectangle = textureRegion.Bounds;

            spriteBatch.Draw(textureRegion.Texture, position, sourceRectangle, color, 0, Vector2.Zero, Vector2.One, SpriteEffects.None, 0);
        }
Ejemplo n.º 3
0
 public static void Draw(this SpriteBatch spriteBatch, TextureRegion2D textureRegion, Rectangle destinationRectangle, Color color)
 {
     spriteBatch.Draw(textureRegion.Texture, destinationRectangle, textureRegion.Bounds, color);
 }