Method | Description | |
---|---|---|
Activate ( bool instancePreserved ) : bool | ||
AddScreen ( |
Adds a new screen to the screen manager.
|
|
Deactivate ( ) : void |
Informs the screen manager to serialize its state to disk.
|
|
Draw ( |
Tells each screen to draw itself.
|
|
FadeBackBufferToBlack ( float alpha ) : void |
Helper draws a translucent black fullscreen sprite, used for fading screens in and out, and for darkening the background behind popups.
|
|
GetScreens ( ) : TraceRacer.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 screen manager component.
|
|
RemoveScreen ( |
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 |
Constructs a new screen manager component.
|
|
Update ( |
Allows each screen to run logic.
|
Method | Description | |
---|---|---|
LoadContent ( ) : void |
Load your graphics content.
|
|
UnloadContent ( ) : void |
Unload your graphics content.
|
Method | Description | |
---|---|---|
TraceScreens ( ) : void |
Prints a list of all the screens, for debugging.
|
public Activate ( bool instancePreserved ) : bool | ||
instancePreserved | bool | |
return | bool |
public AddScreen ( |
||
screen | ||
controllingPlayer | PlayerIndex | |
return | void |
public Draw ( |
||
gameTime | ||
return | void |
public FadeBackBufferToBlack ( float alpha ) : void | ||
alpha | float | |
return | void |
public GetScreens ( ) : TraceRacer.GameScreen[] | ||
return | TraceRacer.GameScreen[] |
public RemoveScreen ( |
||
screen | ||
return | void |
public ScreenManager ( Microsoft.Xna.Framework.Game game ) : System | ||
game | Microsoft.Xna.Framework.Game | |
return | System |
public Update ( |
||
gameTime | ||
return | void |