Dauphine  0.1
A platforming/stealth game in a medieval fantasy setting, developed with SDL2.
Public Member Functions | List of all members
LevelOne Class Reference

The first level of the game. More...

#include <LevelOne.h>

Public Member Functions

 LevelOne ()
 The constructor. More...
 
virtual ~LevelOne ()
 The destructor.
 
virtual void load ()
 Loads the level. More...
 
virtual void update (const double dt_)
 Updates the objects within the Level. More...
 
virtual void unload ()
 Unloads everything that was loaded. More...
 
virtual void render ()
 Renders the level. More...
 
- Public Member Functions inherited from Level
virtual ~Level ()
 The destructor. More...
 
unsigned int getWidth ()
 
unsigned int getHeight ()
 
- Public Member Functions inherited from StateGame
virtual ~StateGame ()
 The destructor.
 
void addEntity (Entity *const entity)
 Adds an entity to the vector.
 
void cleanEntities ()
 Deletes all the entities inside the vector.
 

Additional Inherited Members

- Protected Member Functions inherited from Level
 Level ()
 The constructor. More...
 
virtual void setPlayer (Player *const player_)
 
virtual void setCamera (Camera *const camera_)
 
- Protected Attributes inherited from Level
unsigned int width
 Width that defines the horizontal limits. More...
 
unsigned int height
 Height that defines the vertical limits. More...
 
Playerplayer
 The direct reference to player, even though its in the list. More...
 
Cameracamera
 The current camera for that level. More...
 
TileMaptileMap
 

Detailed Description

The first level of the game.

Derived from Level class.

Constructor & Destructor Documentation

LevelOne::LevelOne ( )

The constructor.

See Also
Level::Level()

Member Function Documentation

void LevelOne::load ( )
virtual

Loads the level.

From the Level1.lua script, loads all the necessary objects.

Implements StateGame.

void LevelOne::render ( )
virtual

Renders the level.

Always renders on 0,0 position.

See Also
Sprite::render()

Implements StateGame.

void LevelOne::unload ( )
virtual

Unloads everything that was loaded.

See Also
LevelOne::load()

Implements StateGame.

void LevelOne::update ( const double  dt_)
virtual

Updates the objects within the Level.

Parameters
dt_: Delta time. Time elapsed between one frame and the other.
Todo:
Refactor this static Enemy::px, Enemy::py.

Implements StateGame.


The documentation for this class was generated from the following files: