From c402e3f1738719267bcbbdd07807589001de03ee Mon Sep 17 00:00:00 2001 From: Tim Young Date: Thu, 21 Sep 2017 06:48:22 -0500 Subject: [PATCH] Add a sprite database after the fact. --- SpriteLibrary/SpriteController.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/SpriteLibrary/SpriteController.cs b/SpriteLibrary/SpriteController.cs index 7a7d28b..32eb5fc 100644 --- a/SpriteLibrary/SpriteController.cs +++ b/SpriteLibrary/SpriteController.cs @@ -306,6 +306,16 @@ namespace SpriteLibrary MyTimer.Interval = newTickMilliseconds; } + /// + /// If you do not instantiate your SpriteController with a database, you can add one after instantiation + /// using this function. + /// + /// The sprite database to pull sprite templates from. + public void SetSpriteDatabase(SpriteDatabase DatabaseToUse) + { + myDatabase = DatabaseToUse; + } + //private void TryTimer(object state) //{ // if (System.Threading.Monitor.TryEnter(lockObject,10))