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
spriteBatchSpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering.
regionTextureRegionThe TextureRegion to render.
destinationRectangleRectangleA rectangular bound that defines the destination to render the TextureRegion into.
colorColorThe 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
spriteBatchSpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering.
regionTextureRegionThe TextureRegion to render.
positionVector2The x- and y-coordinate location to render the TextureRegion at.
colorColorThe 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
spriteBatchSpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering.
regionTextureRegionThe TextureRegion to render.
positionVector2The x- and y-coordinate location to render the TextureRegion at.
colorColorThe color mask to apply when rendering the TextureRegion.
rotationfloatThe amount of rotation, in radians, to apply when rendering the TextureRegion.
originVector2The x- and y-coordinate point of origin to apply when rendering the TextureRegion.
scalefloatThe amount of scaling to apply when rendering the TextureRegion.
effectsSpriteEffectsThe Microsoft.Xna.Framework.Graphics.SpriteEffects to apply for horizontal and vertical axis flipping when rendering the TextureRegion.
layerDepthfloatThe 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
spriteBatchSpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering.
regionTextureRegionThe TextureRegion to render.
positionVector2The x- and y-coordinate location to render the TextureRegion at.
colorColorThe color mask to apply when rendering the TextureRegion.
rotationfloatThe amount of rotation, in radians, to apply when rendering the TextureRegion.
originVector2The x- and y-coordinate point of origin to apply when rendering the TextureRegion.
scaleVector2The amount of scaling to apply when rendering the TextureRegion.
effectsSpriteEffectsThe Microsoft.Xna.Framework.Graphics.SpriteEffects to apply for horizontal and vertical axis flipping when rendering the TextureRegion.
layerDepthfloatThe 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
spriteBatchSpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering.
regionTextureRegionThe TextureRegion to render.
destinationRectangleRectangleA rectangular bound that defines the destination to render the TextureRegion into.
colorColorThe color mask to apply when rendering the TextureRegion.
rotationfloatThe amount of rotation, in radians, to apply when rendering the TextureRegion.
originVector2The x- and y-coordinate point of origin to apply when rendering the TextureRegion.
effectsSpriteEffectsThe Microsoft.Xna.Framework.Graphics.SpriteEffects to apply for horizontal and vertical axis flipping when rendering the TextureRegion.
layerDepthfloatThe 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
spriteBatchSpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering the Sprite.
spriteSpriteThe Sprite to render.
positionVector2The 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
spriteBatchSpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering the AnimatedTilemap.
animatedTilemapAnimatedTilemapThe AnimatedTilemap to draw.
positionVector2The x- and y-coordinate location to render the AnimatedTilemap at.
colorColorThe 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
spriteBatchSpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering the AnimatedTilemap.
animatedTilemapAnimatedTilemapThe AnimatedTilemap to draw.
positionVector2The x- and y-coordinate location to render the AnimatedTilemap at.
colorColorThe color mask to apply when rendering the AnimatedTilemap.
scalefloatThe amount of scaling to apply when rendering the AnimatedTilemap.
layerDepthfloatThe 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
spriteBatchSpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering the AnimatedTilemap.
animatedTilemapAnimatedTilemapThe AnimatedTilemap to draw.
positionVector2The x- and y-coordinate location to render the AnimatedTilemap at.
colorColorThe color mask to apply when rendering the AnimatedTilemap.
scaleVector2The amount of scaling to apply when rendering the AnimatedTilemap.
layerDepthfloatThe 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
spriteBatchSpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering the Tilemap.
tilemapTilemapThe Tilemap to draw.
positionVector2The x- and y-coordinate location to render the Tilemap at.
colorColorThe 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
spriteBatchSpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering the Tilemap.
tilemapTilemapThe Tilemap to draw.
positionVector2The x- and y-coordinate location to render the Tilemap at.
colorColorThe color mask to apply when rendering the Tilemap.
scalefloatThe amount of scaling to apply when rendering the Tilemap.
layerDepthfloatThe 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
spriteBatchSpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering the Tilemap.
tilemapTilemapThe Tilemap to draw.
positionVector2The x- and y-coordinate location to render the Tilemap at.
colorColorThe color mask to apply when rendering the Tilemap.
scaleVector2The amount of scaling to apply when rendering the Tilemap.
layerDepthfloatThe 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
spriteBatchSpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering the TilemapLayer.
layerTilemapLayerThe TilemapLayer to draw.
positionVector2The x- and y-coordinate location to draw the TilemapLayer at. Drawing the TilemapLayer using this method ignores the Offset.
colorColorThe 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
spriteBatchSpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering the TilemapLayer.
layerTilemapLayerThe TilemapLayer to draw.
positionVector2The x- and y-coordinate location to draw the TilemapLayer at. Drawing the TilemapLayer using this method ignores the Offset.
colorColorThe color mask to apply when rendering the TilemapLayer.
scalefloatThe amount of scaling to apply when rendering the TilemapLayer.
layerDepthfloatThe 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
spriteBatchSpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering the TilemapLayer.
layerTilemapLayerThe TilemapLayer to draw.
positionVector2The x- and y-coordinate location to draw the TilemapLayer at. Drawing the TilemapLayer using this method ignores the Offset.
colorColorThe color mask to apply when rendering the TilemapLayer.
scaleVector2The amount of scaling to apply when rendering the TilemapLayer.
layerDepthfloatThe layer depth to apply when rendering the TilemapLayer.