C# Class geek.GameEngine.GameCore

The main class that governs all inner workings of geek.GameEngine.
Mostra file Open project: impworks/xna.geek.engine

Public Properties

Property Type Description
OutputFPS bool

Public Methods

Method Description
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.

Private Methods

Method Description
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.

Method Details

CancelTimedAction() public static method

Remove the timed action from the timeline.
public static CancelTimedAction ( int id ) : void
id int Timed action's ID.
return void

Draw() public static method

The main Draw method for all game components.
public static Draw ( float delta ) : void
delta float
return void

DrawLine() public static method

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

DrawLine() public static method

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

Init() public static method

Initialize the game engine for pure XNA application.
public static Init ( Microsoft.Xna.Framework.Game game ) : void
game Microsoft.Xna.Framework.Game Game instance.
return void

Init() public static method

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

InitSpriteBatch() public static method

Init the spriteBatch's default mode.
public static InitSpriteBatch ( ) : void
return void

LoadContent() public static method

Saves the content pointer.
public static LoadContent ( Microsoft.Xna.Framework.Content.ContentManager content ) : void
content Microsoft.Xna.Framework.Content.ContentManager
return void

RegisterDeferredAction() public static method

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

RegisterTimedAction() public static method

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

SetupGraphics() public static method

Set graphics mode for the game.
public static SetupGraphics ( Microsoft.Xna.Framework.Game game ) : void
game Microsoft.Xna.Framework.Game Game instance.
return void

Update() public static method

The main Update method for all game components.
public static Update ( float delta ) : void
delta float
return void

UpdateBlendingState() public static method

Update the blending state of the sprite batch.
public static UpdateBlendingState ( BlendState newState ) : void
newState Microsoft.Xna.Framework.Graphics.BlendState New blending state.
return void

Property Details

OutputFPS public_oe static_oe property

Outputs FPS into debug console.
public static bool OutputFPS
return bool