Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

GameAgent Class Reference

Inheritance diagram for GameAgent:

Inheritance graph
[legend]
Collaboration diagram for GameAgent:

Collaboration graph
[legend]

Detailed Description

Create game.

GameAgent uses StateManager to manage WorldMap, Pedometer, Level and DemoMode.

Definition at line 14 of file GameAgent.h.

Protected Member Functions

virtual void own_init ()
virtual void own_update ()
 Update game.
virtual void own_shutdown ()
 Remember playtime.


Member Function Documentation

void GameAgent::own_init  )  [protected, virtual]
 

Reimplemented from BaseAgent.

Definition at line 27 of file GameAgent.cpp.

00028 {
00029     m_manager = new StateManager();
00030     Path pathMap = Path::dataReadPath(OptionAgent::agent()->getParam(
00031                 "worldmap", "script/worldmap.lua"));
00032     WorldMap *worldmap = new WorldMap();
00033     worldmap->initMap(pathMap);
00034     m_manager->pushState(NULL, worldmap);
00035 
00036     keyBinding();
00037 }

void GameAgent::own_shutdown  )  [protected, virtual]
 

Remember playtime.

Reimplemented from BaseAgent.

Definition at line 53 of file GameAgent.cpp.

00054 {
00055     OptionAgent *options = OptionAgent::agent();
00056     int playtime = options->getAsInt("playtime");
00057     playtime += SDL_GetTicks() / 1000;
00058     options->setPersistent("playtime", playtime);
00059 
00060     delete m_manager;
00061 }

void GameAgent::own_update  )  [protected, virtual]
 

Update game.

Play level or show menu.

Reimplemented from BaseAgent.

Definition at line 44 of file GameAgent.cpp.

00045 {
00046     m_manager->updateGame();
00047 }


The documentation for this class was generated from the following files:
Generated on Wed Jun 1 09:55:11 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2