C# Class FarseerPhysics.ScreenSystem.GameScreen

A screen is a single layer that has update and draw logic, and which can be combined with other layers to build up a complex menu system. For instance the main menu, the options menu, the "are you sure you want to quit" message box, and the main game itself are all implemented as screens.
Inheritance: IDisposable
Afficher le fichier Open project: tinco/Farseer-Physics Class Usage Examples

Méthodes publiques

Свойство Type Description
FirstRun bool

Méthodes publiques

Méthode Description
Dispose ( ) : void
Draw ( GameTime gameTime ) : void

This is called when the screen should draw itself.

ExitScreen ( ) : void

Tells the screen to go away. Unlike ScreenManager.RemoveScreen, which instantly kills the screen, this method respects the transition timings and will give the screen a chance to gradually transition off.

HandleInput ( FarseerPhysics.ScreenSystem.InputState input ) : void

Allows the screen to handle user input. Unlike Update, this method is only called when the screen is active, and not when some other screen has taken the focus.

Initialize ( ) : void
LoadContent ( ) : void

Load graphics content for the screen.

UnloadContent ( ) : void

Unload content for the screen.

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

Allows the screen to run logic, such as updating the transition position. Unlike HandleInput, this method is called regardless of whether the screen is active, hidden, or in the middle of a transition.

Méthodes protégées

Méthode Description
GameScreen ( ) : System

Private Methods

Méthode Description
MouseDown ( Vector2 p ) : void
MouseMove ( Vector2 p ) : void
MouseUp ( ) : void
UpdateTransition ( GameTime gameTime, System.TimeSpan time, int direction ) : bool

Helper for updating the screen transition position.

Method Details

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Draw() public méthode

This is called when the screen should draw itself.
public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void

ExitScreen() public méthode

Tells the screen to go away. Unlike ScreenManager.RemoveScreen, which instantly kills the screen, this method respects the transition timings and will give the screen a chance to gradually transition off.
public ExitScreen ( ) : void
Résultat void

GameScreen() protected méthode

protected GameScreen ( ) : System
Résultat System

HandleInput() public méthode

Allows the screen to handle user input. Unlike Update, this method is only called when the screen is active, and not when some other screen has taken the focus.
public HandleInput ( FarseerPhysics.ScreenSystem.InputState input ) : void
input FarseerPhysics.ScreenSystem.InputState
Résultat void

Initialize() public méthode

public Initialize ( ) : void
Résultat void

LoadContent() public méthode

Load graphics content for the screen.
public LoadContent ( ) : void
Résultat void

UnloadContent() public méthode

Unload content for the screen.
public UnloadContent ( ) : void
Résultat void

Update() public méthode

Allows the screen to run logic, such as updating the transition position. Unlike HandleInput, this method is called regardless of whether the screen is active, hidden, or in the middle of a transition.
public Update ( GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen ) : void
gameTime Microsoft.Xna.Framework.GameTime
otherScreenHasFocus bool
coveredByOtherScreen bool
Résultat void

Property Details

FirstRun public_oe property

public bool FirstRun
Résultat bool