Method GetRegion
GetRegion(int)
Gets the TextureRegion element at the specified index in this TextureAtlas.
public TextureRegion GetRegion(int index)
Parameters
index
intThe index of the TextureRegion element to locate.
Returns
- TextureRegion
The TextureRegion element that was located.
Exceptions
- ArgumentOutOfRangeException
Thrown if the specified index is less than zero or is greater than or equal to the total number of TextureRegion elements in this TextureAtlas.
GetRegion(string)
Gets the TextureRegion element with the specified name in this TextureAtlas.
public TextureRegion GetRegion(string name)
Parameters
name
stringThe name of the TextureRegion element to locate.
Returns
- TextureRegion
The TextureRegion element that was located.
Exceptions
- KeyNotFoundException
Thrown if this TextureAtlas does not contain a TextureRegion element with the specified name.