Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members

nge::core::Game Class Reference

Here is where the main game loop being run. More...

#include <Game.hpp>

List of all members.

Public Member Functions

 Game (SGameCreationParameters &GameParams)
bool run ()
 ~Game ()

Private Attributes

GameManagerm_pGameManager


Detailed Description

Here is where the main game loop being run.

The Game has the GameManager object which through it, it controls the whole game. Basically it only calles the GameManager::Update() method inside an "infinite" loop properly.
The main cpp file calling main() should look something like this:

                #include "MyFirstState.hpp"
                #include "nge.hpp"

                using namespace nge;

                int main()
                {
                SGameCreationParameters GameParams;

                GameParams.caption = L"Hello World!";
                GameParams.configFile = "config.ini";
                GameParams.firstState = MyFirstState::Instance();

                Game* game = new Game(GameParams);

                game->run();
                delete game;

                return 0;
                }

Definition at line 53 of file Game.hpp.


Constructor & Destructor Documentation

nge::core::Game::Game ( SGameCreationParameters GameParams  ) 

nge::core::Game::~Game (  ) 


Member Function Documentation

bool nge::core::Game::run (  ) 


Member Data Documentation

Definition at line 62 of file Game.hpp.


The documentation for this class was generated from the following file:

The NUSoftware Game Engine
The NUSoftware Game Engine Documentation © 2007-2008 by Tomer Nosrati. Generated on Sat Apr 26 16:52:35 2008 by Doxygen (1.5.5)