C# Класс Indiefreaks.Xna.Core.GameState

Наследование: IUpdate, IDraw, IDisposable
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
ContentToLoad List
Layers List
LoadingComplete bool
LoadingInProgress bool

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

AddLayer() публичный Метод

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
Результат void

Dispose() публичный Метод

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Результат void

Draw() публичный Метод

Draws a frame
public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Результат void

GameState() защищенный Метод

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
Результат System

GameState() защищенный Метод

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
Результат System

GameState() защищенный Метод

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.
Результат System

Initialize() публичный абстрактный Метод

Initializes the GameState. Override this method to load any non-graphics resources and query for any required services.
public abstract Initialize ( ) : void
Результат void

Load() публичный Метод

Loads content
public Load ( ) : void
Результат void

OnLoadingCompleted() защищенный Метод

Raised when the GameState loading is completed
protected OnLoadingCompleted ( ) : void
Результат void

PreLoad() публичный Метод

Register an IContentHost instance with this content manager
public PreLoad ( IContentHost host ) : void
host IContentHost
Результат void

RemoveLayer() публичный Метод

Removes a Layer instance from the stack
public RemoveLayer ( ILayer layer ) : void
layer ILayer The layer instance to remove
Результат void

Update() публичный Метод

Update loop call
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Результат void

Описание свойств

ContentToLoad защищенное свойство

protected List ContentToLoad
Результат List

Layers защищенное свойство

protected List Layers
Результат List

LoadingComplete защищенное свойство

protected bool LoadingComplete
Результат bool

LoadingInProgress защищенное свойство

protected bool LoadingInProgress
Результат bool