e2d::core::GameApplication Class Reference

List of all members.


Detailed Description

This is the main class of Easy2D, it's entry point. To use Easy2D properly, all you have to do is to get an instance of this class, then create an instance of your game (which must be a class inherited from Implementation), pass it to this class' method Execute(), and then you'll end up with a nice running game application !

Public Member Functions

void Execute (Implementation *user_implementation)
 Executes your game.
void SendQuitSignal (void)
 Quits the game application.

Static Public Member Functions

static GameApplicationGetInstance (void)
 Gets an object for this class.

Member Function Documentation

void e2d::core::GameApplication::Execute ( Implementation user_implementation  ) 

Runs your game, as long as you instantiate it and pass it as a parameter to this method.

Parameters:
user_implementation Your game implementation. Remember that this implementation MUST be a class inherited from the abstract class Implementation.

GameApplication * e2d::core::GameApplication::GetInstance ( void   )  [static]

This class is a Singleton. You have to call this method to get an instance of it.

void e2d::core::GameApplication::SendQuitSignal ( void   ) 

Call this method anytime to send a quit signal to Easy2D. At the beginning of the next loop iteration, the engine shall stop and call the Implementation's OnQuit() method instead of the OnRun() method, and then exit normally.


Generated on Tue Dec 8 10:32:44 2009 for Easy2D by  doxygen 1.5.6