C# Class MonoGame.Interop.GameModule

Inheritance: System.Windows.Controls.ContentControl
Show file Open project: Eastrall/MonoGame.Interop Class Usage Examples

Private Properties

Property Type Description
BeginRun void
DrawingSurface_Draw void
DrawingSurface_LoadContent void
DrawingSurface_Loaded void
DrawingSurface_Unloaded void
EndRun void
GetButtonState ButtonState
UpdateKeyboard void
UpdateMouse void

Public Methods

Method Description
Dispose ( ) : void

Dispose the game module.

GameModule ( ) : Microsoft.Xna.Framework

Creates a new GameModule's instance.

Protected Methods

Method Description
Draw ( GameTime gameTime ) : void

Called when the game determines it is time to draw a frame. Override this method with game-specific rendering code.

Initialize ( ) : void

Called after the Game and GraphicsDevice are created, but before LoadContent.

LoadContent ( ) : void

Called when graphics resources need to be loaded. Override this method to load any game-specific graphics resources.

UnloadContent ( ) : void

Called when graphics resources need to be unloaded. Override this method to unload any game-specific graphics resources.

Update ( GameTime gameTime ) : void

Called when the game has determined that game logic needs to be processed. This might include the management of the game state, the processing of user input, or the updating of simulation data. Override this method with game-specific logic.

Private Methods

Method Description
BeginRun ( ) : void

Begin running the game module.

DrawingSurface_Draw ( Object sender, DrawEventArgs e ) : void

DrawingSurface_LoadContent ( Object sender, GraphicsDeviceEventArgs e ) : void

DrawingSurface_Loaded ( Object sender, System e ) : void

DrawingSurface_Unloaded ( Object sender, System e ) : void

EndRun ( ) : void

Ends running the game module.

GetButtonState ( MouseButtonState mouseState ) : ButtonState

Converts a MouseButtonState into a ButtonState.

UpdateKeyboard ( Object sender, KeyEventArgs e ) : void

Updates the keyboard state.

UpdateMouse ( Object sender, MouseEventArgs e ) : void

Update mouse state.

Method Details

Dispose() public method

Dispose the game module.
public Dispose ( ) : void
return void

Draw() protected method

Called when the game determines it is time to draw a frame. Override this method with game-specific rendering code.
protected Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime Time passed since the last call to Draw.
return void

GameModule() public method

Creates a new GameModule's instance.
public GameModule ( ) : Microsoft.Xna.Framework
return Microsoft.Xna.Framework

Initialize() protected method

Called after the Game and GraphicsDevice are created, but before LoadContent.
protected Initialize ( ) : void
return void

LoadContent() protected method

Called when graphics resources need to be loaded. Override this method to load any game-specific graphics resources.
protected LoadContent ( ) : void
return void

UnloadContent() protected method

Called when graphics resources need to be unloaded. Override this method to unload any game-specific graphics resources.
protected UnloadContent ( ) : void
return void

Update() protected method

Called when the game has determined that game logic needs to be processed. This might include the management of the game state, the processing of user input, or the updating of simulation data. Override this method with game-specific logic.
protected Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime Time passed since the last call to Update.
return void