C# Class Indiefreaks.Xna.Core.GameState

Inheritance: IUpdate, IDraw, IDisposable
Datei anzeigen Open project: Indiefreaks/igf Class Usage Examples

Protected Properties

Property Type Description
ContentToLoad List
Layers List
LoadingComplete bool
LoadingInProgress bool

Public Methods

Method 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

Protected Methods

Method 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

Method 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 method

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
return void

Dispose() public method

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

Draw() public method

Draws a frame
public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

GameState() protected method

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
return System

GameState() protected method

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
return System

GameState() protected method

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.
return System

Initialize() public abstract method

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

Load() public method

Loads content
public Load ( ) : void
return void

OnLoadingCompleted() protected method

Raised when the GameState loading is completed
protected OnLoadingCompleted ( ) : void
return void

PreLoad() public method

Register an IContentHost instance with this content manager
public PreLoad ( IContentHost host ) : void
host IContentHost
return void

RemoveLayer() public method

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

Update() public method

Update loop call
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

Property Details

ContentToLoad protected_oe property

protected List ContentToLoad
return List

Layers protected_oe property

protected List Layers
return List

LoadingComplete protected_oe property

protected bool LoadingComplete
return bool

LoadingInProgress protected_oe property

protected bool LoadingInProgress
return bool