Method Draw
Draw(SpriteBatch, TextureRegion, Rectangle, Color)
Draws a TextureRegion using the Microsoft.Xna.Framework.Graphics.SpriteBatch.
public static void Draw(this SpriteBatch spriteBatch, TextureRegion region, Rectangle destinationRectangle, Color color)
Parameters
spriteBatch
SpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering.
region
TextureRegionThe TextureRegion to render.
destinationRectangle
RectangleA rectangular bound that defines the destination to render the TextureRegion into.
color
ColorThe color mask to apply when rendering the TextureRegion.
Draw(SpriteBatch, TextureRegion, Vector2, Color)
Draws a TextureRegion using the Microsoft.Xna.Framework.Graphics.SpriteBatch.
public static void Draw(this SpriteBatch spriteBatch, TextureRegion region, Vector2 position, Color color)
Parameters
spriteBatch
SpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering.
region
TextureRegionThe TextureRegion to render.
position
Vector2The x- and y-coordinate location to render the TextureRegion at.
color
ColorThe color mask to apply when rendering the TextureRegion.
Draw(SpriteBatch, TextureRegion, Vector2, Color, float, Vector2, float, SpriteEffects, float)
Draws a TextureRegion using the Microsoft.Xna.Framework.Graphics.SpriteBatch.
public static void Draw(this SpriteBatch spriteBatch, TextureRegion region, Vector2 position, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth)
Parameters
spriteBatch
SpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering.
region
TextureRegionThe TextureRegion to render.
position
Vector2The x- and y-coordinate location to render the TextureRegion at.
color
ColorThe color mask to apply when rendering the TextureRegion.
rotation
floatThe amount of rotation, in radians, to apply when rendering the TextureRegion.
origin
Vector2The x- and y-coordinate point of origin to apply when rendering the TextureRegion.
scale
floatThe amount of scaling to apply when rendering the TextureRegion.
effects
SpriteEffectsThe Microsoft.Xna.Framework.Graphics.SpriteEffects to apply for horizontal and vertical axis flipping when rendering the TextureRegion.
layerDepth
floatThe layer depth to apply when rendering the TextureRegion.
Draw(SpriteBatch, TextureRegion, Vector2, Color, float, Vector2, Vector2, SpriteEffects, float)
Draws a TextureRegion using the Microsoft.Xna.Framework.Graphics.SpriteBatch.
public static void Draw(this SpriteBatch spriteBatch, TextureRegion region, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth)
Parameters
spriteBatch
SpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering.
region
TextureRegionThe TextureRegion to render.
position
Vector2The x- and y-coordinate location to render the TextureRegion at.
color
ColorThe color mask to apply when rendering the TextureRegion.
rotation
floatThe amount of rotation, in radians, to apply when rendering the TextureRegion.
origin
Vector2The x- and y-coordinate point of origin to apply when rendering the TextureRegion.
scale
Vector2The amount of scaling to apply when rendering the TextureRegion.
effects
SpriteEffectsThe Microsoft.Xna.Framework.Graphics.SpriteEffects to apply for horizontal and vertical axis flipping when rendering the TextureRegion.
layerDepth
floatThe layer depth to apply when rendering the TextureRegion.
Draw(SpriteBatch, TextureRegion, Rectangle, Color, float, Vector2, SpriteEffects, float)
Draws a TextureRegion using the Microsoft.Xna.Framework.Graphics.SpriteBatch.
public static void Draw(this SpriteBatch spriteBatch, TextureRegion region, Rectangle destinationRectangle, Color color, float rotation, Vector2 origin, SpriteEffects effects, float layerDepth)
Parameters
spriteBatch
SpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering.
region
TextureRegionThe TextureRegion to render.
destinationRectangle
RectangleA rectangular bound that defines the destination to render the TextureRegion into.
color
ColorThe color mask to apply when rendering the TextureRegion.
rotation
floatThe amount of rotation, in radians, to apply when rendering the TextureRegion.
origin
Vector2The x- and y-coordinate point of origin to apply when rendering the TextureRegion.
effects
SpriteEffectsThe Microsoft.Xna.Framework.Graphics.SpriteEffects to apply for horizontal and vertical axis flipping when rendering the TextureRegion.
layerDepth
floatThe layer depth to apply when rendering the TextureRegion.
Draw(SpriteBatch, Sprite, Vector2)
Draws a Sprite using the Microsoft.Xna.Framework.Graphics.SpriteBatch.
public static void Draw(this SpriteBatch spriteBatch, Sprite sprite, Vector2 position)
Parameters
spriteBatch
SpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering the Sprite.
sprite
SpriteThe Sprite to render.
position
Vector2The x- and y-coordinate location to render the Sprite at.
Draw(SpriteBatch, AnimatedTilemap, Vector2, Color)
Draws an AnimatedTilemap using the Microsoft.Xna.Framework.Graphics.SpriteBatch.
public static void Draw(this SpriteBatch spriteBatch, AnimatedTilemap animatedTilemap, Vector2 position, Color color)
Parameters
spriteBatch
SpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering the AnimatedTilemap.
animatedTilemap
AnimatedTilemapThe AnimatedTilemap to draw.
position
Vector2The x- and y-coordinate location to render the AnimatedTilemap at.
color
ColorThe color mask to apply when rendering the AnimatedTilemap.
Draw(SpriteBatch, AnimatedTilemap, Vector2, Color, float, float)
Draws an AnimatedTilemap using the Microsoft.Xna.Framework.Graphics.SpriteBatch.
public static void Draw(this SpriteBatch spriteBatch, AnimatedTilemap animatedTilemap, Vector2 position, Color color, float scale, float layerDepth)
Parameters
spriteBatch
SpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering the AnimatedTilemap.
animatedTilemap
AnimatedTilemapThe AnimatedTilemap to draw.
position
Vector2The x- and y-coordinate location to render the AnimatedTilemap at.
color
ColorThe color mask to apply when rendering the AnimatedTilemap.
scale
floatThe amount of scaling to apply when rendering the AnimatedTilemap.
layerDepth
floatThe layer depth to apply when rendering the AnimatedTilemap.
Draw(SpriteBatch, AnimatedTilemap, Vector2, Color, Vector2, float)
Draws an AnimatedTilemap using the Microsoft.Xna.Framework.Graphics.SpriteBatch.
public static void Draw(this SpriteBatch spriteBatch, AnimatedTilemap animatedTilemap, Vector2 position, Color color, Vector2 scale, float layerDepth)
Parameters
spriteBatch
SpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering the AnimatedTilemap.
animatedTilemap
AnimatedTilemapThe AnimatedTilemap to draw.
position
Vector2The x- and y-coordinate location to render the AnimatedTilemap at.
color
ColorThe color mask to apply when rendering the AnimatedTilemap.
scale
Vector2The amount of scaling to apply when rendering the AnimatedTilemap.
layerDepth
floatThe layer depth to apply when rendering the AnimatedTilemap.
Draw(SpriteBatch, Tilemap, Vector2, Color)
Draws a Tilemap using the Microsoft.Xna.Framework.Graphics.SpriteBatch.
public static void Draw(this SpriteBatch spriteBatch, Tilemap tilemap, Vector2 position, Color color)
Parameters
spriteBatch
SpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering the Tilemap.
tilemap
TilemapThe Tilemap to draw.
position
Vector2The x- and y-coordinate location to render the Tilemap at.
color
ColorThe color mask to apply when rendering the Tilemap.
Draw(SpriteBatch, Tilemap, Vector2, Color, float, float)
Draws a Tilemap using the Microsoft.Xna.Framework.Graphics.SpriteBatch.
public static void Draw(this SpriteBatch spriteBatch, Tilemap tilemap, Vector2 position, Color color, float scale, float layerDepth)
Parameters
spriteBatch
SpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering the Tilemap.
tilemap
TilemapThe Tilemap to draw.
position
Vector2The x- and y-coordinate location to render the Tilemap at.
color
ColorThe color mask to apply when rendering the Tilemap.
scale
floatThe amount of scaling to apply when rendering the Tilemap.
layerDepth
floatThe layer depth to apply when rendering the Tilemap.
Draw(SpriteBatch, Tilemap, Vector2, Color, Vector2, float)
Draws a Tilemap using the Microsoft.Xna.Framework.Graphics.SpriteBatch.
public static void Draw(this SpriteBatch spriteBatch, Tilemap tilemap, Vector2 position, Color color, Vector2 scale, float layerDepth)
Parameters
spriteBatch
SpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering the Tilemap.
tilemap
TilemapThe Tilemap to draw.
position
Vector2The x- and y-coordinate location to render the Tilemap at.
color
ColorThe color mask to apply when rendering the Tilemap.
scale
Vector2The amount of scaling to apply when rendering the Tilemap.
layerDepth
floatThe layer depth to apply when rendering the Tilemap.
Draw(SpriteBatch, TilemapLayer, Vector2, Color)
Draws a TilemapLayer layer using the Microsoft.Xna.Framework.Graphics.SpriteBatch.
public static void Draw(this SpriteBatch spriteBatch, TilemapLayer layer, Vector2 position, Color color)
Parameters
spriteBatch
SpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering the TilemapLayer.
layer
TilemapLayerThe TilemapLayer to draw.
position
Vector2The x- and y-coordinate location to draw the TilemapLayer at. Drawing the TilemapLayer using this method ignores the Offset.
color
ColorThe color mask to apply when rendering the TilemapLayer.
Draw(SpriteBatch, TilemapLayer, Vector2, Color, float, float)
Draws a TilemapLayer layer using the Microsoft.Xna.Framework.Graphics.SpriteBatch.
public static void Draw(this SpriteBatch spriteBatch, TilemapLayer layer, Vector2 position, Color color, float scale, float layerDepth)
Parameters
spriteBatch
SpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering the TilemapLayer.
layer
TilemapLayerThe TilemapLayer to draw.
position
Vector2The x- and y-coordinate location to draw the TilemapLayer at. Drawing the TilemapLayer using this method ignores the Offset.
color
ColorThe color mask to apply when rendering the TilemapLayer.
scale
floatThe amount of scaling to apply when rendering the TilemapLayer.
layerDepth
floatThe layer depth to apply when rendering the TilemapLayer.
Draw(SpriteBatch, TilemapLayer, Vector2, Color, Vector2, float)
Draws a TilemapLayer layer using the Microsoft.Xna.Framework.Graphics.SpriteBatch.
public static void Draw(this SpriteBatch spriteBatch, TilemapLayer layer, Vector2 position, Color color, Vector2 scale, float layerDepth)
Parameters
spriteBatch
SpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering the TilemapLayer.
layer
TilemapLayerThe TilemapLayer to draw.
position
Vector2The x- and y-coordinate location to draw the TilemapLayer at. Drawing the TilemapLayer using this method ignores the Offset.
color
ColorThe color mask to apply when rendering the TilemapLayer.
scale
Vector2The amount of scaling to apply when rendering the TilemapLayer.
layerDepth
floatThe layer depth to apply when rendering the TilemapLayer.