Class TextureAtlas
Defines a TextureAtlas with a source image and zero or more TextureRegion elements.
public class TextureAtlas : IEnumerable<TextureRegion>, IEnumerable
- Inheritance
-
TextureAtlas
- Implements
- Inherited Members
Constructors
- TextureAtlas(string, Texture2D)
Initializes a new instance of the TextureAtlas class.
Properties
- this[int]
Gets the TextureRegion element at the specified index in this TextureAtlas.
- this[string]
Gets the TextureRegion element with the specified name in this TextureAtlas.
- Name
Gets the name assigned to this TextureAtlas.
- RegionCount
Gets the total number of TextureRegion elements in this TextureAtlas.
- Texture
Gets the source image of this TextureAtlas.
Methods
- Clear()
Removes all TextureRegion elements from this TextureAtlas.
- ContainsRegion(string)
Returns a value that indicates whether this TextureAtlas contains a TextureRegion element with the specified name.
- CreateRegion(string, Point, Point)
Creates a new TextureRegion and adds it to this TextureAtlas.
- CreateRegion(string, Rectangle)
Creates a new TextureRegion and adds it to this TextureAtlas.
- CreateRegion(string, int, int, int, int)
Creates a new TextureRegion and adds it to this TextureAtlas.
- CreateSprite(int)
Creates a new Sprite from the TextureRegion at the specified index in this TextureAtlas.
- CreateSprite(string)
Creates a new Sprite from the TextureRegion with the specified name in this TextureAtlas.
- CreateSprite(string, int)
Creates a new Sprite from the TextureRegion at the specified index in this TextureAtlas.
- CreateSprite(string, string)
Creates a new Sprite from the TextureRegion with the specified name in this TextureAtlas.
- GetEnumerator()
Returns an enumerator that iterates through the collection.
- GetIndexOfRegion(string)
Returns the index of the TextureRegion element with the specified name in this TextureAtlas.
- GetRegion(int)
Gets the TextureRegion element at the specified index in this TextureAtlas.
- GetRegion(string)
Gets the TextureRegion element with the specified name in this TextureAtlas.
- GetRegions(params int[])
Gets a new List<T> of all TextureRegion elements at the specified indexes in this TextureAtlas. Order of the elements in the collection returned is the same as the order of the indexes specified.
- GetRegions(params string[])
Gets a new List<T> of all TextureRegion elements with the specified names in this TextureAtlas. Order of the elements in the collection returned is the same as the order of names specified.
- RemoveRegion(int)
Removes the TextureRegion element at the specified index from this TextureAtlas.
- RemoveRegion(string)
Removes the TextureRegion element with the specified name from this TextureAtlas.
- TryGetRegion(int, out TextureRegion?)
Gets the TextureRegion element at the specified index in this TextureAtlas.
- TryGetRegion(string, out TextureRegion?)
Gets the TextureRegion element with the specified name in this TextureAtlas.