![]() |
Dragonfly 2.2
A text-based game engine
|
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 GameManager & | getInstance () |
| 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. | |
| 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).
1.7.3