#include <Game.h>
Public Methods | |
| Game () | |
| Constructor. | |
| ~Game () | |
| Destructor. | |
| void | update (float dt) |
| Updates the game logic. | |
| void | draw () |
| Draws all game objects. | |
| bool | control (float dt) |
| Control all the game objects. | |
| Map * | getMap () const |
| Get the current map. | |
| void | addEntity (Entity *e) |
| Add an entity to the game. | |
| void | addController (Controller *c) |
| Add a controller to the game. | |
| void | addLogic (GameLogic *g) |
| Add a GameLogic to the game. | |
| void | addEffect (Effect *e) |
| Add an Effect to the game. | |
| bool | startNewGame (int mapNum) |
| Starts a new game. | |
| void | resetMap () |
| Sets a flag so that the Map will restart the game completely anew at the start of the next update call. | |
|
|
Constructor.
|
|
|
Destructor.
|
|
|
Add a controller to the game. Control will automatically be read from the controller each iteration of the game loop.
|
|
|
Add an Effect to the game. The object will be updated each iteration of the game loop.
|
|
|
Add an entity to the game. The entity will automatically be drawn and updated every iteration of the game loop.
|
|
|
Add a GameLogic to the game. The object will be updated each iteration of the game loop.
|
|
|
Control all the game objects.
|
|
|
Draws all game objects.
|
|
|
Get the current map.
|
|
|
Sets a flag so that the Map will restart the game completely anew at the start of the next update call.
|
|
|
Starts a new game. The parameter is the number of the map file in the maps directory to use for the game (ex: 0 would load maps/map0.map).
|
|
|
Updates the game logic.
|
1.2.18