Contains the functions to manage the background objects. More...
#include <B_BackgroundManager.h>
Public Member Functions | |
B_BackgroundManager (SDL_Renderer *renderer, C_Vec2 dimensions, float *universalSpeed) | |
Constructs the Background Manager. More... | |
~B_BackgroundManager () | |
Destructs the Background Manager. More... | |
void | update (float dt) |
A function to update the Backgrounds. More... | |
void | draw (SDL_Renderer *renderer) |
A function to draw the Backgrounds to the screen. More... | |
Private Attributes | |
C_Texture * | background [3] |
The Background images. More... | |
B_Background * | bottomBackgroundLayer |
The bottom background layer backgrounds. More... | |
B_Background * | middleBackgroundLayer [2] |
The middle background layer backgrounds. More... | |
B_Background * | topBackgroundLayer [2] |
The top background layer backgrounds. More... | |
float * | universalSpeed |
A pointer for the universal speed of the game. More... | |
Contains the functions to manage the background objects.
B_BackgroundManager::B_BackgroundManager | ( | SDL_Renderer * | renderer, |
C_Vec2 | dimensions, | ||
float * | universalSpeed | ||
) |
Constructs the Background Manager.
renderer | A pointer to the renderer. |
dimensions | The screen dimensions. |
universalSpeed | A pointer for the universal speed of the game. |
B_BackgroundManager::~B_BackgroundManager | ( | ) |
Destructs the Background Manager.
void B_BackgroundManager::draw | ( | SDL_Renderer * | renderer | ) |
A function to draw the Backgrounds to the screen.
renderer | A pointer to the renderer. |
void B_BackgroundManager::update | ( | float | dt | ) |
A function to update the Backgrounds.
dt | The delta time. |
|
private |
The Background images.
|
private |
The bottom background layer backgrounds.
|
private |
The middle background layer backgrounds.
|
private |
The top background layer backgrounds.
|
private |
A pointer for the universal speed of the game.