|
| | SpriteSheet (ContentXElement element, string path="", string file="") |
| |
| | SpriteSheet (string filePath, int columnCount, int rowCount, Vector2 origin, Rectangle? sourceRect=null) |
| |
| override void | Draw (ISpriteBatch spriteBatch, Vector2 pos, Color color, Vector2 origin, float rotate, Vector2 scale, SpriteEffects spriteEffect=SpriteEffects.None, float? depth=default(float?)) |
| |
| void | Draw (ISpriteBatch spriteBatch, int spriteIndex, Vector2 pos, Color color, Vector2 origin, float rotate, Vector2 scale, SpriteEffects spriteEffect=SpriteEffects.None, float? depth=default(float?)) |
| |
| override string | ToString () |
| |
| | Sprite (ContentXElement element, string path="", string file="", bool lazyLoad=false) |
| |
| | Sprite (string newFile, Vector2 newOrigin) |
| |
| | Sprite (string newFile, Rectangle? sourceRectangle, Vector2? origin=null, float rotation=0) |
| |
| void | Remove () |
| |
| void | ReloadXML () |
| | Works only if there is a name attribute defined for the sprite. For items and structures, the entity id or name is used if the sprite's name attribute is not defined. More...
|
| |
| bool | ParseTexturePath (string path="", string file="") |
| |
| | Sprite (Sprite other) |
| |
| | Sprite (Texture2D texture, Rectangle? sourceRectangle, Vector2? newOffset, float newRotation=0.0f, string path=null) |
| |
| async Task | LazyLoadAsync () |
| |
| void | EnsureLazyLoaded (bool isAsync=false) |
| |
| void | ReloadTexture () |
| |
| void | Draw (ISpriteBatch spriteBatch, Vector2 pos, float rotate=0.0f, float scale=1.0f, SpriteEffects spriteEffect=SpriteEffects.None) |
| |
| void | Draw (ISpriteBatch spriteBatch, Vector2 pos, Color color, float rotate=0.0f, float scale=1.0f, SpriteEffects spriteEffect=SpriteEffects.None, float? depth=null) |
| |
| void | Draw (ISpriteBatch spriteBatch, Vector2 pos, Color color, Vector2 origin, float rotate=0.0f, float scale=1.0f, SpriteEffects spriteEffect=SpriteEffects.None, float? depth=null) |
| |
| void | DrawSilhouette (SpriteBatch spriteBatch, Vector2 pos, Vector2 origin, float rotate, Vector2 scale, SpriteEffects spriteEffect=SpriteEffects.None, float? depth=null) |
| | Creates a silhouette for the sprite (or outline if the sprite is rendered on top of it) More...
|
| |
| void | DrawTiled (ISpriteBatch spriteBatch, Vector2 position, Vector2 targetSize, float rotation=0f, Vector2? origin=null, Color? color=null, Vector2? startOffset=null, Vector2? textureScale=null, float? depth=null, SpriteEffects? spriteEffects=null) |
| |
|
| static Identifier | GetIdentifier (XElement sourceElement) |
| | Creates a supposedly unique identifier from the parent element. If the parent element is not found, uses the sprite element. TODO: If there are multiple elements with exactly the same data, the ids will fail. -> Is there a better way to identify the sprites? ALSO TODO: delete :) More...
|
| |
| static Texture2D | LoadTexture (string file, bool compress=true, ContentPackage contentPackage=null) |
| |
| Vector2 | size = Vector2.One |
| |
| float | rotation |
| |
| SpriteEffects | effects = SpriteEffects.None |
| |
| static readonly Version | LastBrokenTiledSpriteGameVersion = new Version(major: 1, minor: 2, build: 7, revision: 0) |
| | Last version of the game that had broken handling of sprites that were scaled, flipped and offset More...
|
| |
| Vector2 | offset |
| |
| Vector2 | origin |
| |
| float | depth |
| |
| volatile bool | loadingAsync = false |
| |