Added a function to check for the existence of a region.

This commit is contained in:
Harrison Deng 2019-01-29 15:55:56 -06:00
parent 8ea9ae3921
commit ff2e0b479f

View File

@ -73,6 +73,16 @@ namespace RecrownedAthenaeum.SpecialTypes
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>
/// Disposes unmanaged resources for the texture atlas.
/// </summary>