C# Class Indiefreaks.Xna.Core.GameState

Inheritance: IUpdate, IDraw, IDisposable
Afficher le fichier Open project: Indiefreaks/igf Class Usage Examples

Protected Properties

Свойство Type Description
ContentToLoad List
Layers List
LoadingComplete bool
LoadingInProgress bool

Méthodes publiques

Méthode Description
AddLayer ( ILayer layer ) : void

Adds a Layer instance at the end of the stack

The layers are updated and rendered in the order they were added.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Draw ( GameTime gameTime ) : void

Draws a frame

Initialize ( ) : void

Initializes the GameState. Override this method to load any non-graphics resources and query for any required services.

Load ( ) : void

Loads content

PreLoad ( IContentHost host ) : void

Register an IContentHost instance with this content manager

RemoveLayer ( ILayer layer ) : void

Removes a Layer instance from the stack

Update ( GameTime gameTime ) : void

Update loop call

Méthodes protégées

Méthode Description
GameState ( string name, Application application ) : System

Creates a new GameState instance

GameState ( string name, Application application, bool useApplicationContent, int bufferWidth, int bufferHeight, DetailPreference precisionMode, DetailPreference lightingRange ) : System
GameState ( string name, Application application, int bufferWidth, int bufferHeight, DetailPreference precisionMode, DetailPreference lightingRange ) : System

Creates a new instance of the SunBurnGameState

OnLoadingCompleted ( ) : void

Raised when the GameState loading is completed

Private Methods

Méthode Description
BeginFrame ( GameTime gameTime ) : void
CreateFrameBuffers ( int bufferWidth, int bufferHeight, DetailPreference precisionMode, DetailPreference lightingRange ) : void
EndFrame ( ) : void
GraphicsDevice_DeviceReset ( object sender, EventArgs e ) : void
IDraw ( GameTime gameTime ) : void

Draws a frame

IUpdate ( GameTime gameTime ) : void
LoadAsynchronously ( ) : void

Method Details

AddLayer() public méthode

Adds a Layer instance at the end of the stack
The layers are updated and rendered in the order they were added.
public AddLayer ( ILayer layer ) : void
layer ILayer The layer instance to add
Résultat void

Dispose() public méthode

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Résultat void

Draw() public méthode

Draws a frame
public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void

GameState() protected méthode

Creates a new GameState instance
protected GameState ( string name, Application application ) : System
name string The name of the GameState
application Application The current Application instance
Résultat System

GameState() protected méthode

protected GameState ( string name, Application application, bool useApplicationContent, int bufferWidth, int bufferHeight, DetailPreference precisionMode, DetailPreference lightingRange ) : System
name string
application Application
useApplicationContent bool
bufferWidth int
bufferHeight int
precisionMode DetailPreference
lightingRange DetailPreference
Résultat System

GameState() protected méthode

Creates a new instance of the SunBurnGameState
protected GameState ( string name, Application application, int bufferWidth, int bufferHeight, DetailPreference precisionMode, DetailPreference lightingRange ) : System
name string The name of the GameState
application Application The Application instance
bufferWidth int Custom buffer width
bufferHeight int Custom buffer height
precisionMode DetailPreference Increases visual quality at the cost of performance. Generally used in visualizations, most games do not need this option.
lightingRange DetailPreference Increases lighting quality at the cost of performance. Adds additional lighting range when using HDR.
Résultat System

Initialize() public abstract méthode

Initializes the GameState. Override this method to load any non-graphics resources and query for any required services.
public abstract Initialize ( ) : void
Résultat void

Load() public méthode

Loads content
public Load ( ) : void
Résultat void

OnLoadingCompleted() protected méthode

Raised when the GameState loading is completed
protected OnLoadingCompleted ( ) : void
Résultat void

PreLoad() public méthode

Register an IContentHost instance with this content manager
public PreLoad ( IContentHost host ) : void
host IContentHost
Résultat void

RemoveLayer() public méthode

Removes a Layer instance from the stack
public RemoveLayer ( ILayer layer ) : void
layer ILayer The layer instance to remove
Résultat void

Update() public méthode

Update loop call
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void

Property Details

ContentToLoad protected_oe property

protected List ContentToLoad
Résultat List

Layers protected_oe property

protected List Layers
Résultat List

LoadingComplete protected_oe property

protected bool LoadingComplete
Résultat bool

LoadingInProgress protected_oe property

protected bool LoadingInProgress
Résultat bool