C# Класс geek.GameEngine.GameCore

The main class that governs all inner workings of geek.GameEngine.
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
OutputFPS bool

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

Метод Описание
CancelTimedAction ( int id ) : void

Remove the timed action from the timeline.

Draw ( float delta ) : void

The main Draw method for all game components.

DrawLine ( Vector2 from, Vector2 to ) : void

Draws a white line on the screen. Is used for bounding box debugging.

DrawLine ( float x1, float y1, float x2, float y2 ) : void

Draws a white line on the screen. Is used for bounding box debugging.

Init ( Microsoft.Xna.Framework.Game game ) : void

Initialize the game engine for pure XNA application.

Init ( GraphicsDevice device, Microsoft.Xna.Framework.Content.ContentManager content ) : void

Initialize the game engine for silverlight-xna shared application.

InitSpriteBatch ( ) : void

Init the spriteBatch's default mode.

LoadContent ( Microsoft.Xna.Framework.Content.ContentManager content ) : void

Saves the content pointer.

RegisterDeferredAction ( System.Action action ) : void

Register a callback that is invoked after all objects are updated. It's used to manipulate object's position in the list to avoid modifying the collection being traversed.

RegisterTimedAction ( float timeout, System.Action action, string comment = null ) : int

Register an action to occur after the given amount of time.

SetupGraphics ( Microsoft.Xna.Framework.Game game ) : void

Set graphics mode for the game.

Update ( float delta ) : void

The main Update method for all game components.

UpdateBlendingState ( BlendState newState ) : void

Update the blending state of the sprite batch.

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

Метод Описание
executeDeferredActions ( ) : void

Execute all the deferred actions.

initCommon ( ) : void

Common initialization features that are not project-type-dependent.

updateScreenSize ( DisplayOrientation orientation ) : void

Update screen size depending on orientation

validateStoryBoard ( ) : void

Check if the storyboard contains at least one level.

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

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

Remove the timed action from the timeline.
public static CancelTimedAction ( int id ) : void
id int Timed action's ID.
Результат void

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

The main Draw method for all game components.
public static Draw ( float delta ) : void
delta float
Результат void

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

Draws a white line on the screen. Is used for bounding box debugging.
public static DrawLine ( Vector2 from, Vector2 to ) : void
from Vector2 First point.
to Vector2 Second point.
Результат void

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

Draws a white line on the screen. Is used for bounding box debugging.
public static DrawLine ( float x1, float y1, float x2, float y2 ) : void
x1 float First point's X coordinate.
y1 float First point's Y coordinate.
x2 float Second point's X coordinate.
y2 float Second point's Y coordinate.
Результат void

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

Initialize the game engine for pure XNA application.
public static Init ( Microsoft.Xna.Framework.Game game ) : void
game Microsoft.Xna.Framework.Game Game instance.
Результат void

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

Initialize the game engine for silverlight-xna shared application.
public static Init ( GraphicsDevice device, Microsoft.Xna.Framework.Content.ContentManager content ) : void
device GraphicsDevice
content Microsoft.Xna.Framework.Content.ContentManager
Результат void

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

Init the spriteBatch's default mode.
public static InitSpriteBatch ( ) : void
Результат void

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

Saves the content pointer.
public static LoadContent ( Microsoft.Xna.Framework.Content.ContentManager content ) : void
content Microsoft.Xna.Framework.Content.ContentManager
Результат void

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

Register a callback that is invoked after all objects are updated. It's used to manipulate object's position in the list to avoid modifying the collection being traversed.
public static RegisterDeferredAction ( System.Action action ) : void
action System.Action
Результат void

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

Register an action to occur after the given amount of time.
public static RegisterTimedAction ( float timeout, System.Action action, string comment = null ) : int
timeout float Time to wait before executing the action.
action System.Action Action to execute.
comment string Optional comment for debugging.
Результат int

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

Set graphics mode for the game.
public static SetupGraphics ( Microsoft.Xna.Framework.Game game ) : void
game Microsoft.Xna.Framework.Game Game instance.
Результат void

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

The main Update method for all game components.
public static Update ( float delta ) : void
delta float
Результат void

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

Update the blending state of the sprite batch.
public static UpdateBlendingState ( BlendState newState ) : void
newState Microsoft.Xna.Framework.Graphics.BlendState New blending state.
Результат void

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

OutputFPS публичное статическое свойство

Outputs FPS into debug console.
public static bool OutputFPS
Результат bool