Add a sprite database after the fact.

This commit is contained in:
Tim Young 2017-09-21 06:48:22 -05:00
parent 743ab78c28
commit c402e3f173
1 changed files with 10 additions and 0 deletions

View File

@ -306,6 +306,16 @@ namespace SpriteLibrary
MyTimer.Interval = newTickMilliseconds;
}
/// <summary>
/// If you do not instantiate your SpriteController with a database, you can add one after instantiation
/// using this function.
/// </summary>
/// <param name="DatabaseToUse">The sprite database to pull sprite templates from.</param>
public void SetSpriteDatabase(SpriteDatabase DatabaseToUse)
{
myDatabase = DatabaseToUse;
}
//private void TryTimer(object state)
//{
// if (System.Threading.Monitor.TryEnter(lockObject,10))