Added a function to check for the existence of a region.
This commit is contained in:
parent
8ea9ae3921
commit
ff2e0b479f
@ -73,6 +73,16 @@ namespace RecrownedAthenaeum.SpecialTypes
|
|||||||
return dictionaryOfRegions[name].AsTexture2D(graphicsDevice);
|
return dictionaryOfRegions[name].AsTexture2D(graphicsDevice);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether or not this atlas contains the given region name.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="regionName">The name of the region to check for.</param>
|
||||||
|
/// <returns>True if this atlas does contain the region given by name.</returns>
|
||||||
|
public bool ContainsRegion(string regionName)
|
||||||
|
{
|
||||||
|
return dictionaryOfRegions.ContainsKey(regionName);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Disposes unmanaged resources for the texture atlas.
|
/// Disposes unmanaged resources for the texture atlas.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user