C# Class SmartboyDevelopments.Haxxit.MonoGame.HaxxitEngine

This is the main type for your game
Inheritance: Microsoft.Xna.Framework.Game
Show file Open project: smartboyathome/Haxxit Class Usage Examples

Public Methods

Method Description
ChangeState ( HaxxitGameState state ) : void

Removes all states currently on the stack then adds passed in state to the stack.

ChangeStateListener ( SimplePubSub notifiable, string channel, object sender, EventArgs args ) : void

A listener for notifications to change states sent through haxxit.engine.state.change.

ClearAllStateListener ( SimplePubSub notifiable, string channel, object sender, EventArgs args ) : void

A listener for notifications to clear the state stack sent through haxxit.engine.state.clear_all

ClearChangeStateListener ( SimplePubSub notifiable, string channel, object sender, EventArgs args ) : void

A listener for notifications to clear the state stack then push a new state onto it, sent through haxxit.engine.state.clear_change.

ClearStates ( ) : void

Clears the state stack.

HaxxitEngine ( ) : System
PopState ( ) : void

Pops a state from the stack.

PopStateListener ( SimplePubSub notifiable, string channel, object sender, EventArgs args ) : void

A listener for notifications to pop states sent through haxxit.engine.state.pop.

PushState ( HaxxitGameState state ) : void

Pushes a state onto the stack.

PushStateListener ( SimplePubSub notifiable, string channel, object sender, EventArgs args ) : void

A listener for notifications to push states sent through haxxit.engine.state.push.

Protected Methods

Method Description
Draw ( GameTime gameTime ) : void

This is called when the game should draw itself.

Initialize ( ) : void

Allows the game to perform any initialization it needs to before starting to run. This is where it can query for any required services and load any non-graphic related content. Calling base.Initialize will enumerate through any components and initialize them as well.

LoadContent ( ) : void

LoadContent will be called once per game and is the place to load all of your content.

UnloadContent ( ) : void

UnloadContent will be called once per game and is the place to unload all content.

Update ( GameTime gameTime ) : void

Allows the game to run logic such as updating the world, checking for collisions, gathering input, and playing audio.

Method Details

ChangeState() public method

Removes all states currently on the stack then adds passed in state to the stack.
public ChangeState ( HaxxitGameState state ) : void
state HaxxitGameState The state to add to the stack after all other states are dropped.
return void

ChangeStateListener() public method

A listener for notifications to change states sent through haxxit.engine.state.change.
public ChangeStateListener ( SimplePubSub notifiable, string channel, object sender, EventArgs args ) : void
notifiable SimplePubSub
channel string The channel the notification is being sent through (haxxit.engine.state.change).
sender object The sender object of this notification.
args System.EventArgs The arguments for this notification (only takes ChangeStateEventArgs).
return void

ClearAllStateListener() public method

A listener for notifications to clear the state stack sent through haxxit.engine.state.clear_all
public ClearAllStateListener ( SimplePubSub notifiable, string channel, object sender, EventArgs args ) : void
notifiable SimplePubSub
channel string The channel the notification is being sent through (haxxit.engine.state.clear_all).
sender object The sender object of this notification.
args System.EventArgs The arguments for this notification (requires no arguments).
return void

ClearChangeStateListener() public method

A listener for notifications to clear the state stack then push a new state onto it, sent through haxxit.engine.state.clear_change.
public ClearChangeStateListener ( SimplePubSub notifiable, string channel, object sender, EventArgs args ) : void
notifiable SimplePubSub
channel string The channel the notification is being sent through (haxxit.engine.state.clear_change).
sender object The sender object of this notification.
args System.EventArgs The arguments for this notification (only takes ChangeStateEventArgs).
return void

ClearStates() public method

Clears the state stack.
public ClearStates ( ) : void
return void

Draw() protected method

This is called when the game should draw itself.
protected Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime Provides a snapshot of timing values.
return void

HaxxitEngine() public method

public HaxxitEngine ( ) : System
return System

Initialize() protected method

Allows the game to perform any initialization it needs to before starting to run. This is where it can query for any required services and load any non-graphic related content. Calling base.Initialize will enumerate through any components and initialize them as well.
protected Initialize ( ) : void
return void

LoadContent() protected method

LoadContent will be called once per game and is the place to load all of your content.
protected LoadContent ( ) : void
return void

PopState() public method

Pops a state from the stack.
public PopState ( ) : void
return void

PopStateListener() public method

A listener for notifications to pop states sent through haxxit.engine.state.pop.
public PopStateListener ( SimplePubSub notifiable, string channel, object sender, EventArgs args ) : void
notifiable SimplePubSub
channel string The channel the notification is being sent through (haxxit.engine.state.pop).
sender object The sender object of this notification.
args System.EventArgs The arguments for this notification (requires no arguments).
return void

PushState() public method

Pushes a state onto the stack.
public PushState ( HaxxitGameState state ) : void
state HaxxitGameState The state to push onto the top of the stack.
return void

PushStateListener() public method

A listener for notifications to push states sent through haxxit.engine.state.push.
public PushStateListener ( SimplePubSub notifiable, string channel, object sender, EventArgs args ) : void
notifiable SimplePubSub
channel string The channel the notification is being sent through (haxxit.engine.state.push).
sender object The sender object of this notification.
args System.EventArgs The arguments for this notification (only takes ChangeStateEventArgs).
return void

UnloadContent() protected method

UnloadContent will be called once per game and is the place to unload all content.
protected UnloadContent ( ) : void
return void

Update() protected method

Allows the game to run logic such as updating the world, checking for collisions, gathering input, and playing audio.
protected Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime Provides a snapshot of timing values.
return void