Claypool

Courses

Publications

Students

Projects

Service

Downloads

Misc


Dragonfly: GameManager Class Reference
Dragonfly 2.2
A text-based game engine
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions

GameManager Class Reference

Inheritance diagram for GameManager:
Manager

List of all members.

Public Member Functions

int startUp ()
 Startup all the GameManager services.
int startUp (bool flush)
 Startup all the GameManager services.
int startUp (bool flush, time_t seed)
 Startup all the GameManager services.
void shutDown ()
 Shut down the GameManager services.
void run (int fr_time=DEFAULT_FRAME_TIME)
 Run the game loop.
void setGameOver ()
 Indicate the game is over, which will stop the game loop.
void setGameOver (bool new_game_over)
 Set game over status to indicated value.
int getFrameTime ()
 Return frame time.

Static Public Member Functions

static GameManagergetInstance ()
 Get the singleton instance of the GameManager.

Protected Attributes

bool game_over
 True -> game loop should stop.
int frame_time
 Target time per game loop, in millisec.

Private Member Functions

 GameManager ()
 Private since a singleton.
 GameManager (GameManager const &)
 Don't allow copy.
void operator= (GameManager const &)
 Don't allow assignment.

Member Function Documentation

void GameManager::run ( int  fr_time = DEFAULT_FRAME_TIME)

Run the game loop.

fr_time is time between frames

int GameManager::startUp ( bool  flush)

Startup all the GameManager services.

if flush is true, call fflush() after each write (default false).

int GameManager::startUp ( bool  flush,
time_t  seed 
)

Startup all the GameManager services.

if flush is true, call fflush() after each write (default false). seed = random seed (default is seed with system time).


The documentation for this class was generated from the following file:
 All Classes Functions Variables Friends