C# Class ScreenManagement.ScreenManager

Inheritance: Microsoft.Xna.Framework.DrawableGameComponent
Afficher le fichier Open project: giladgray/XNA-ScreenManager

Méthodes publiques

Méthode Description
AddScreen ( GameScreen GameScreen, PlayerIndex controllingPlayer ) : void

Adds a new GameScreen to the GameScreen manager.

Draw ( GameTime gameTime ) : void

Tells each GameScreen to draw itself.

FadeBackBufferToColor ( Color color, int alpha ) : void

Helper draws a translucent black fullscreen sprite, used for fading screens in and out, and for darkening the background behind popups.

GetScreen ( int index ) : GameScreen

Get a screen by index.

GetScreens ( ) : ScreenManagement.GameScreen[]

Expose an array holding all the screens. We return a copy rather than the real master list, because screens should only ever be added or removed using the AddScreen and RemoveScreen methods.

Initialize ( ) : void

Initializes the GameScreen manager component.

RemoveAllScreens ( ) : void

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

RemoveScreen ( GameScreen GameScreen ) : void

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

ScreenManager ( Game game ) : System

Constructs a new GameScreen manager component.

Update ( GameTime gameTime ) : void

Allows each GameScreen to run logic.

Méthodes protégées

Méthode Description
LoadContent ( ) : void

Load your graphics content.

UnloadContent ( ) : void

Unload your graphics content.

Private Methods

Méthode Description
TraceScreens ( ) : void

Prints a list of all the screens, for debugging.

Method Details

AddScreen() public méthode

Adds a new GameScreen to the GameScreen manager.
public AddScreen ( GameScreen GameScreen, PlayerIndex controllingPlayer ) : void
GameScreen GameScreen
controllingPlayer PlayerIndex
Résultat void

Draw() public méthode

Tells each GameScreen to draw itself.
public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void

FadeBackBufferToColor() public méthode

Helper draws a translucent black fullscreen sprite, used for fading screens in and out, and for darkening the background behind popups.
public FadeBackBufferToColor ( Color color, int alpha ) : void
color Color
alpha int
Résultat void

GetScreen() public méthode

Get a screen by index.
public GetScreen ( int index ) : GameScreen
index int
Résultat GameScreen

GetScreens() public méthode

Expose an array holding all the screens. We return a copy rather than the real master list, because screens should only ever be added or removed using the AddScreen and RemoveScreen methods.
public GetScreens ( ) : ScreenManagement.GameScreen[]
Résultat ScreenManagement.GameScreen[]

Initialize() public méthode

Initializes the GameScreen manager component.
public Initialize ( ) : void
Résultat void

LoadContent() protected méthode

Load your graphics content.
protected LoadContent ( ) : void
Résultat void

RemoveAllScreens() public méthode

Removes all GameScreens from the GameScreen manager. You should normally use GameScreen.ExitScreen instead of calling this directly, so the GameScreens can gradually transition off rather than just being instantly removed.
public RemoveAllScreens ( ) : void
Résultat void

RemoveScreen() public méthode

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

ScreenManager() public méthode

Constructs a new GameScreen manager component.
public ScreenManager ( Game game ) : System
game Game
Résultat System

UnloadContent() protected méthode

Unload your graphics content.
protected UnloadContent ( ) : void
Résultat void

Update() public méthode

Allows each GameScreen to run logic.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void