A State that contains and runs the End Game Menu. More...
#include <SM_EndGame.h>
Public Member Functions | |
SM_EndGame (S_StateManager *stateManager, SDL_Renderer *renderer, C_Vec2 dimensions, C_Music *backgroundMusic, int score) | |
Constructs the State object. More... | |
~SM_EndGame () | |
Destructs the State object. More... | |
bool | input () |
Handles the State input. More... | |
void | update (float dt) |
A function to update the State. More... | |
void | draw () |
A function to draw the State to the screen. More... | |
Public Member Functions inherited from S_State | |
S_State (S_StateManager *stateManager, SDL_Renderer *renderer, C_Vec2 dimensions) | |
Constructs the State object. More... | |
virtual | ~S_State () |
A virtual destructor for the State object. More... | |
Private Member Functions | |
void | loadScores () |
A function to load in the scores. More... | |
void | compareScores (int score) |
A function to compare the scores. More... | |
void | writeScores () |
A function to write out the scores. More... | |
Private Attributes | |
C_Music * | backgroundMusic |
The background music. More... | |
C_Texture * | background |
The Background Image. More... | |
C_Texture * | buttonBackground |
The Button Background Image. More... | |
float * | universalSpeed |
A pointer for the universal speed of the menu. More... | |
std::vector< std::string > | scores |
A std::vector of the loaded scores. More... | |
UI_Button * | retryButton |
The retry Button. More... | |
UI_Button * | exitButton |
The Exit Button. More... | |
C_Texture * | gameOver |
The Game Over Image. More... | |
C_Texture * | coin |
The Coin Image. More... | |
C_Text * | scoreText |
The Score text. More... | |
C_Vec2 | coinDim |
The dimensions of the coin image. More... | |
float | buttonYPos [1] |
bool | updateScores |
Additional Inherited Members | |
Protected Attributes inherited from S_State | |
S_StateManager * | stateManager |
A pointer to the state manager. More... | |
SDL_Renderer * | renderer |
A pointer to the renderer. More... | |
C_Vec2 | dimensions |
The screen dimensions. More... | |
A State that contains and runs the End Game Menu.
SM_EndGame::SM_EndGame | ( | S_StateManager * | stateManager, |
SDL_Renderer * | renderer, | ||
C_Vec2 | dimensions, | ||
C_Music * | backgroundMusic, | ||
int | score | ||
) |
Constructs the State object.
stateManager | A pointer to the StateManager. |
renderer | A pointer to the renderer. |
dimensions | The screen dimensions. |
backgroundMusic | The background music of the State. |
score | The most score from the last game. |
SM_EndGame::~SM_EndGame | ( | ) |
Destructs the State object.
|
private |
A function to compare the scores.
score | The new score to compare to the old scores. |
|
virtual |
A function to draw the State to the screen.
Implements S_State.
|
virtual |
Handles the State input.
Implements S_State.
|
private |
A function to load in the scores.
|
virtual |
A function to update the State.
dt | The delta time. |
Implements S_State.
|
private |
A function to write out the scores.
|
private |
The Background Image.
|
private |
The background music.
|
private |
The Button Background Image.
|
private |
|
private |
The Coin Image.
|
private |
The dimensions of the coin image.
|
private |
The Exit Button.
|
private |
The Game Over Image.
|
private |
The retry Button.
|
private |
A std::vector of the loaded scores.
|
private |
The Score text.
|
private |
A pointer for the universal speed of the menu.
|
private |