![]() |
Dauphine
0.1
A platforming/stealth game in a medieval fantasy setting, developed with SDL2.
|
Parent class for other game states. More...
#include <StateGame.h>
Public Member Functions | |
| virtual | ~StateGame () |
| The destructor. | |
| virtual void | load ()=0 |
| Loads necessary objects. More... | |
| virtual void | update (const double dt_)=0 |
| Update all entities. More... | |
| virtual void | unload ()=0 |
| Unloads necessary objects. More... | |
| virtual void | render ()=0 |
| Renders the level. More... | |
| void | addEntity (Entity *const entity) |
| Adds an entity to the vector. | |
| void | cleanEntities () |
| Deletes all the entities inside the vector. | |
Protected Attributes | |
| std::vector< Entity * > | entities |
| List of all the entities in the state. More... | |
Parent class for other game states.
|
pure virtual |
Loads necessary objects.
Pure virtual function. Purpose is to load all things relevant to the state.
Implemented in GStateSplash, GStateCredits, GStateGameOver, GStateMenu, GStateOptions, and LevelOne.
|
pure virtual |
Renders the level.
Always render on 0,0 position.
Implemented in GStateSplash, GStateCredits, GStateGameOver, GStateMenu, GStateOptions, and LevelOne.
|
pure virtual |
Unloads necessary objects.
Pure virtual function. Purpose is to unload whatever was previously loaded.
Implemented in GStateSplash, GStateCredits, GStateGameOver, GStateMenu, GStateOptions, and LevelOne.
|
pure virtual |
Update all entities.
Pure virtual function. Purpose is to update all the entities in the vector.
| dt_ | : Delta time. Time elapsed between one frame and the other. |
Implemented in GStateSplash, GStateCredits, GStateGameOver, GStateMenu, GStateOptions, and LevelOne.
|
protected |
List of all the entities in the state.
1.8.4