SmlProgram

SmlProgram is a public sealed class in the SMLimitless Namespace. It inherits from the Microsoft.Xna.Framework.Game class, which contains the main game loop and the required XNA objects. This class is created by the Program entry point class.

Constructor
Constructs an instance of SmlProgram.

Initialize
Initializes all the static classes needed for the game, including SpritesheetManager and ScreenManager.

LoadContent
Called after Initialize, this loads the content for the game. Note that LoadContent will be called on lower levels as levels and other resources are loaded.

UnloadContent
This method unloads all non-ContentManager content (which is almost all of it). Unloading content this way is cleaner and safer, as it uses the disposable pattern.

Update
This is one of the two primary methods that run the game. Here, the ScreenManager's Update method is called, which calls the active's screen's Update, which then calls its own object's Update, and so forth. The gameTime parameter is an XNA type that holds timing information for the game.

Draw
This is the other of the two primary methods that run the game, and the call chain is the same as Update. Here, the SpriteBatch begins drawing, all objects that need to be drawn are placed into a draw list, and then the frame is drawn.

Execution Flow
An instance of SmlProgram is created by the Program class, which is the executable's entry point. The game's Run method, implemented by XNA's Game class, is called, which calls Initialize and LoadContent, and then calls Update and Draw repeatedly until the game exits, at which UnloadContent is called.