C# Class FarseerPhysics.Samples.ScreenSystem.ScreenManager

The screen manager is a component which manages one or more GameScreen instances. It maintains a stack of screens, calls their Update and Draw methods at the appropriate times, and automatically routes input to the topmost active screen.
Inheritance: Microsoft.Xna.Framework.DrawableGameComponent
Mostrar archivo Open project: tinco/Farseer-Physics Class Usage Examples

Public Methods

Method Description
AddScreen ( GameScreen screen ) : void

Adds a new screen to the screen manager.

Draw ( GameTime gameTime ) : void

Tells each screen to draw itself.

Initialize ( ) : void

Initializes the screen manager component.

RemoveScreen ( GameScreen screen ) : void

Removes a screen from the screen manager. You should normally use GameScreen.ExitScreen instead of calling this directly, so the screen can gradually transition off rather than just being instantly removed.

ScreenManager ( Microsoft.Xna.Framework.Game game ) : System.Collections.Generic

Constructs a new screen manager component.

Update ( GameTime gameTime ) : void

Allows each screen to run logic.

Protected Methods

Method Description
LoadContent ( ) : void

Load your graphics content.

UnloadContent ( ) : void

Unload your graphics content.

Method Details

AddScreen() public method

Adds a new screen to the screen manager.
public AddScreen ( GameScreen screen ) : void
screen GameScreen
return void

Draw() public method

Tells each screen to draw itself.
public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

Initialize() public method

Initializes the screen manager component.
public Initialize ( ) : void
return void

LoadContent() protected method

Load your graphics content.
protected LoadContent ( ) : void
return void

RemoveScreen() public method

Removes a screen from the screen manager. You should normally use GameScreen.ExitScreen instead of calling this directly, so the screen can gradually transition off rather than just being instantly removed.
public RemoveScreen ( GameScreen screen ) : void
screen GameScreen
return void

ScreenManager() public method

Constructs a new screen manager component.
public ScreenManager ( Microsoft.Xna.Framework.Game game ) : System.Collections.Generic
game Microsoft.Xna.Framework.Game
return System.Collections.Generic

UnloadContent() protected method

Unload your graphics content.
protected UnloadContent ( ) : void
return void

Update() public method

Allows each screen to run logic.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void