Midnight Blue Game and Engine
Public Member Functions | Protected Member Functions | Properties | List of all members
MB2D.MBGame Class Reference

This is the main type for your game. More...

Inheritance diagram for MB2D.MBGame:
Inheritance graph
Collaboration diagram for MB2D.MBGame:
Collaboration graph

Public Member Functions

 MBGame (Type initSceneType)
 Initializes a new instance of the T:MB2D.MBGame class and defines essential graphics settings. More...
 
void RegisterSystems ()
 Registers all EntitySystems used in the engine More...
 

Protected Member Functions

override void Initialize ()
 Allows the game to perform any initialization it needs to before starting to run. This is where it can query for any required services and load any non-graphic related content. Calling base.Initialize will enumerate through any components and initialize them as well. More...
 
override void LoadContent ()
 Loads content at the beginning of the game More...
 
override void Update (GameTime gameTime)
 Allows the game to run logic such as updating the world, checking for collisions, gathering input, and playing audio. More...
 
override void Draw (GameTime gameTime)
 Draws the current scene to the window More...
 

Properties

static GraphicsDevice Graphics [get]
 Gets the main graphics device. More...
 
static Camera2D Camera [get]
 Gets the main camera. More...
 
static MBConsole Console [get]
 Gets the debug console for reading and writing to. There should only ever be one of these More...
 
static float DeltaTime [get]
 Gets time it took to complete the last frame More...
 
static float FPS [get]
 Gets the current average frames per second More...
 
static bool ForceQuit [get, set]
 Gets or sets a value indicating whether this T:MB2D.MBGame should quit. More...
 

Detailed Description

This is the main type for your game.

Constructor & Destructor Documentation

§ MBGame()

MB2D.MBGame.MBGame ( Type  initSceneType)
inline

Initializes a new instance of the T:MB2D.MBGame class and defines essential graphics settings.

Member Function Documentation

§ Draw()

override void MB2D.MBGame.Draw ( GameTime  gameTime)
inlineprotected

Draws the current scene to the window

Parameters
gameTimeProvides a snapshot of timing values.
Here is the call graph for this function:

§ Initialize()

override void MB2D.MBGame.Initialize ( )
inlineprotected

Allows the game to perform any initialization it needs to before starting to run. This is where it can query for any required services and load any non-graphic related content. Calling base.Initialize will enumerate through any components and initialize them as well.

Here is the call graph for this function:

§ LoadContent()

override void MB2D.MBGame.LoadContent ( )
inlineprotected

Loads content at the beginning of the game

Here is the call graph for this function:

§ RegisterSystems()

void MB2D.MBGame.RegisterSystems ( )
inline

Registers all EntitySystems used in the engine

Here is the caller graph for this function:

§ Update()

override void MB2D.MBGame.Update ( GameTime  gameTime)
inlineprotected

Allows the game to run logic such as updating the world, checking for collisions, gathering input, and playing audio.

Parameters
gameTimeProvides a snapshot of timing values.
Here is the call graph for this function:

Property Documentation

§ Camera

Camera2D MB2D.MBGame.Camera
staticget

Gets the main camera.

The main camera.

§ Console

MBConsole MB2D.MBGame.Console
staticget

Gets the debug console for reading and writing to. There should only ever be one of these

The debug console.

§ DeltaTime

float MB2D.MBGame.DeltaTime
staticget

Gets time it took to complete the last frame

The delta time.

§ ForceQuit

bool MB2D.MBGame.ForceQuit
staticgetset

Gets or sets a value indicating whether this T:MB2D.MBGame should quit.

true if the game should quit; otherwise, false.

§ FPS

float MB2D.MBGame.FPS
staticget

Gets the current average frames per second

The fps.

§ Graphics

GraphicsDevice MB2D.MBGame.Graphics
staticget

Gets the main graphics device.

The graphics device.


The documentation for this class was generated from the following file: