Table of Contents

Class Sprite

Namespace
MonoGame.Aseprite
Assembly
MonoGame.Aseprite.dll

Defines a named sprite

public class Sprite
Inheritance
Sprite
Derived
Inherited Members

Constructors

Sprite(string, Texture2D)

Initializes a new instance of the Sprite class.

Sprite(string, TextureRegion)

Initializes a new instance of the Sprite class.

Properties

Color

Gets or Sets the color mask to apply when rendering this Sprite.

FlipHorizontally

Gets or Sets a value that indicates whether to flip this Sprite horizontally when rendering.

FlipVertically

Gets or Sets a value that indicates whether to flip this Sprite vertically when rendering.

Height

Gets the height, in pixels, of this Sprite

IsVisible

Gets or Sets a value that indicates if this Sprite is visible and can be rendered.

LayerDepth

Gets or Sets the layer depth to render this Sprite at.

Name

Gets the name assigned to this Sprite.

Origin

Gets or Sets the x- and y-coordinate point of origin to apply when rendering this Sprite.

OriginX

Gets or Sets the x-coordinate point of origin to apply when rendering this Sprite.

OriginY

Gets or Sets the y-coordinate point of origin to apply when rendering this Sprite.

Rotation

Gets or Sets the rotation, in radians, to apply when rendering this Sprite.

Scale

Gets or Sets the x- and y-axis scale factor to use when rendering this Sprite.

ScaleX

Gets or Sets the x-axis scale factor to use when rendering this Sprite.

ScaleY

Gets or Sets the y-axis scale factor to use when rendering this Sprite.

SpriteEffects

Gets or Sets the Microsoft.Xna.Framework.Graphics.SpriteEffects to apply for vertical and horizontal flipping when rendering this Sprite.

TextureRegion

Gets the source TextureRegion of this Sprite.

Transparency

Gets or Sets the level of transparency, between 0.0f, and 1.0f, to apply when rendering this Sprite.

Width

Gets the width, in pixels, of this Sprite

Methods

Draw(SpriteBatch, Vector2)

Renders this Sprite.