some documentation

This commit is contained in:
Tim Young 2017-09-18 14:08:06 -05:00
parent 4ce60ad422
commit 86d956365e

View File

@ -18,16 +18,33 @@ namespace SpriteLibrary
}
/// <summary>
/// Store of all the types of things in the ADVDemo
/// Store Sprite information in a database. You can preload your database with sprite definitions, and then
/// create the sprites as needed. This can drastically reduce the initial load time of a game or something.
/// Though, what it really does is spread out the load time. It still takes the same amount of time to
/// load all the sprites, it just loads them on-demand. Using a dictionary often hides any load time issues.
/// </summary>
public class SpriteDatabase
{
/// <summary>
/// This is the list of SpriteInfo records that the database knows about. You can create your own list,
/// modify this list, or whatever. The database has some reasonable functions for loading and saving a
/// sprite database.
/// </summary>
public List<SpriteInfo> SpriteInfoList = new List<SpriteInfo>();
List<ImageStruct> TheImages = new List<ImageStruct>();
ResourceManager myResourceManager = null;
string Filename = "";
Size SnapGridSize = new Size(5, 5);
/// <summary>
/// The sprite database instantiation function. The filename can either be a file on the computer or it
/// can be the string name of a resource (the filename without the extension. If your file is accessed
/// by Properties.Resources.MySprites, the "filename" would be "MySprites")
/// </summary>
/// <param name="theResourceManager">The ResourceManager for your project. Usually
/// Properties.Resources.ResourceManager</param>
/// <param name="filename">Either a path and file (like: @"c:\users\me\Desktop\myfile.xml") or
/// the name of a resource (like: "myfile")</param>
public SpriteDatabase(ResourceManager theResourceManager, string filename)
{
myResourceManager = theResourceManager;