Sprite
Introduction
Creating a Sprite in Code
// Creates a new Sprite instance
var sprite = new Sprite();
// Assigns the texture to display.
sprite.Texture = TextureFile;
// Sets the Sprite's scale so that it renders 1:1 relative to its source Texture
sprite.TextureScale = 1;
// Adds the Sprite to the SpriteManager so that it is shown, and so that it is
// "managed" (velocity, acceleration, and attachments are maintained)
SpriteManager.AddSprite(sprite);SpriteManager.RemoveSprite(sprite);Sprite Scale
Texture
Color and Alpha
Z Buffered Sprites
Particle Sprites
Last updated
Was this helpful?