![]() |
Dauphine
0.1
A platforming/stealth game in a medieval fantasy setting, developed with SDL2.
|
Abstract class for levels. More...
#include <Level.h>
Public Member Functions | |
| virtual | ~Level () |
| The destructor. More... | |
| unsigned int | getWidth () |
| unsigned int | getHeight () |
Public Member Functions inherited from StateGame | |
| 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 Member Functions | |
| Level () | |
| The constructor. More... | |
| virtual void | setPlayer (Player *const player_) |
| virtual void | setCamera (Camera *const camera_) |
Protected Attributes | |
| unsigned int | width |
| Width that defines the horizontal limits. More... | |
| unsigned int | height |
| Height that defines the vertical limits. More... | |
| Player * | player |
| The direct reference to player, even though its in the list. More... | |
| Camera * | camera |
| The current camera for that level. More... | |
| TileMap * | tileMap |
Protected Attributes inherited from StateGame | |
| std::vector< Entity * > | entities |
| List of all the entities in the state. More... | |
Abstract class for levels.
Contains a background, player and a camera.
|
virtual |
The destructor.
Deletes all the allocated attributes, even though the specific levels should.
|
protected |
The constructor.
Initializes all the attributes.
| unsigned int Level::getHeight | ( | ) |
| unsigned int Level::getWidth | ( | ) |
|
protectedvirtual |
| camera_ | : Sets the camera for the level. |
|
protectedvirtual |
| player_ | : Sets the player for the level. |
|
protected |
The current camera for that level.
|
protected |
Height that defines the vertical limits.
|
protected |
The direct reference to player, even though its in the list.
|
protected |
Width that defines the horizontal limits.
1.8.4