C# Class SmartboyDevelopments.Haxxit.MonoGame.HaxxitEngine

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

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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 méthode

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.
Résultat void

ChangeStateListener() public méthode

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).
Résultat void

ClearAllStateListener() public méthode

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).
Résultat void

ClearChangeStateListener() public méthode

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).
Résultat void

ClearStates() public méthode

Clears the state stack.
public ClearStates ( ) : void
Résultat void

Draw() protected méthode

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.
Résultat void

HaxxitEngine() public méthode

public HaxxitEngine ( ) : System
Résultat System

Initialize() protected méthode

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
Résultat void

LoadContent() protected méthode

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

PopState() public méthode

Pops a state from the stack.
public PopState ( ) : void
Résultat void

PopStateListener() public méthode

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).
Résultat void

PushState() public méthode

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

PushStateListener() public méthode

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).
Résultat void

UnloadContent() protected méthode

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

Update() protected méthode

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.
Résultat void