Method GetRegions
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.
public List<TextureRegion> GetRegions(params int[] indexes)
Parameters
indexes
int[]The indexes of the TextureRegion elements to locate.
Returns
- List<TextureRegion>
A new List<T> containing the TextureRegion elements located.
Exceptions
- ArgumentOutOfRangeException
Thrown if any of the specified indexes are less than zero or if any are greater than or equal to the total number of TextureRegion elements in this TextureAtlas.
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.
public List<TextureRegion> GetRegions(params string[] names)
Parameters
names
string[]The names of the TextureRegion elements to locate.
Returns
- List<TextureRegion>
A new List<T> containing the TextureRegion elements located.
Exceptions
- KeyNotFoundException
Thrown if any of the specified names do not match a TextureRegion element in this TextureAtlas.