GluonEngine::Game Class Reference
#include <game.h>
List of all members.
Detailed Description
Definition at line 57 of file game.h.
Member Function Documentation
void Game::cleanupAll |
( |
|
) |
[slot] |
Cleanup all objects in the current scene.
Definition at line 228 of file game.cpp.
Scene* GluonEngine::Game::currentScene |
( |
|
) |
const |
void Game::drawAll |
( |
int |
time = 1 |
) |
[slot] |
Draw all items in the current scene.
Definition at line 211 of file game.cpp.
int Game::getCurrentTick |
( |
|
) |
|
GameObject * Game::getFromScene |
( |
const QString & |
name |
) |
|
Retrieve an object from the current scene.
- Parameters:
-
| name | The name of the object |
Definition at line 358 of file game.cpp.
void Game::initializeAll |
( |
|
) |
[slot] |
Initialize all objects in the current scene.
Definition at line 201 of file game.cpp.
bool Game::isPaused |
( |
|
) |
const |
bool Game::isRunning |
( |
|
) |
const |
void GluonEngine::Game::painted |
( |
int |
|
) |
[signal] |
Generate a random number between 0 and 1.
Implemented here as a workaround for a Qt bug.
- Returns:
- The random number generated.
Definition at line 233 of file game.cpp.
void Game::resetCurrentScene |
( |
|
) |
[slot] |
Resets the current scene to its initial conditions
Definition at line 297 of file game.cpp.
void GluonEngine::Game::runGame |
( |
|
) |
[inline, slot] |
void Game::runGameFixedTimestep |
( |
int |
framesPerSecond = 25 |
) |
[slot] |
Run the game using a fixed time between each update
- Parameters:
-
| int | framesPerSecond The number of frames per second that the game will attempt to keep up with |
Definition at line 125 of file game.cpp.
void Game::runGameFixedUpdate |
( |
int |
updatesPerSecond = 25 , |
|
|
int |
maxFrameSkip = 5 | |
|
) |
| | [slot] |
Run the game at full framerate (with an optional maximum number of skipped frames), but with a fixed game update rate, defaulting to 25 updates per second
- Parameters:
-
| int | updatesPerSecond The number of updates per second - Parameters:
-
| int | maxFrameSkip The maximum number of frames that you're allowed to skip before forcing a redraw |
|
Definition at line 62 of file game.cpp.
void Game::setCurrentScene |
( |
const QString & |
sceneName |
) |
[slot] |
void Game::setCurrentScene |
( |
Scene * |
newCurrentScene |
) |
[slot] |
void Game::setPause |
( |
bool |
pause |
) |
[slot] |
void GluonEngine::Game::showDebug |
( |
const QString & |
debugText |
) |
[signal] |
void Game::startAll |
( |
|
) |
[slot] |
Start all objects in the current scene.
Definition at line 206 of file game.cpp.
void Game::stopAll |
( |
|
) |
[slot] |
Stop all objects in the current scene.
Definition at line 223 of file game.cpp.
void Game::stopGame |
( |
|
) |
[slot] |
void Game::updateAll |
( |
int |
time = 10 |
) |
[slot] |
Update all items in the current scene.
Definition at line 217 of file game.cpp.
void GluonEngine::Game::updated |
( |
int |
|
) |
[signal] |
Friends And Related Function Documentation
Property Documentation
Scene * Game::currentScene [read, write] |
The Scene which is currently being handled by the game loop
Definition at line 63 of file game.h.
The GameProject containing the game which is currently being played
Definition at line 67 of file game.h.
The documentation for this class was generated from the following files: