C# Class TraceRacer.BackgroundScreen

The background screen sits behind all the other menu screens. It draws a background image that remains fixed in place regardless of whatever transitions the screens on top of it may be doing.
Inheritance: GameScreen
Afficher le fichier Open project: alexcoco/trace_racer Class Usage Examples

Méthodes publiques

Свойство Type Description
position int

Méthodes publiques

Méthode Description
Activate ( bool instancePreserved ) : void

Loads graphics content for this screen. The background texture is quite big, so we use our own local ContentManager to load it. This allows us to unload before going from the menus into the game itself, wheras if we used the shared ContentManager provided by the Game class, the content would remain loaded forever.

BackgroundScreen ( ) : System

Constructor.

Draw ( GameTime gameTime ) : void

Draws the background screen.

Unload ( ) : void

Unloads graphics content for this screen.

Update ( GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen ) : void

Updates the background screen. Unlike most screens, this should not transition off even if it has been covered by another screen: it is supposed to be covered, after all! This overload forces the coveredByOtherScreen parameter to false in order to stop the base Update method wanting to transition off.

Method Details

Activate() public méthode

Loads graphics content for this screen. The background texture is quite big, so we use our own local ContentManager to load it. This allows us to unload before going from the menus into the game itself, wheras if we used the shared ContentManager provided by the Game class, the content would remain loaded forever.
public Activate ( bool instancePreserved ) : void
instancePreserved bool
Résultat void

BackgroundScreen() public méthode

Constructor.
public BackgroundScreen ( ) : System
Résultat System

Draw() public méthode

Draws the background screen.
public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void

Unload() public méthode

Unloads graphics content for this screen.
public Unload ( ) : void
Résultat void

Update() public méthode

Updates the background screen. Unlike most screens, this should not transition off even if it has been covered by another screen: it is supposed to be covered, after all! This overload forces the coveredByOtherScreen parameter to false in order to stop the base Update method wanting to transition off.
public Update ( GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen ) : void
gameTime Microsoft.Xna.Framework.GameTime
otherScreenHasFocus bool
coveredByOtherScreen bool
Résultat void

Property Details

position public_oe property

public int position
Résultat int