A State that contains and runs the splash screen. More...
#include <S_Splash.h>
Public Member Functions | |
S_Splash (S_StateManager *stateManager, SDL_Renderer *renderer, C_Vec2 dimensions, C_Music *backgroundMusic) | |
Constructs the State object. More... | |
~S_Splash () | |
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 Attributes | |
C_Music * | backgroundMusic |
The background music. More... | |
float * | universalSpeed |
A pointer for the universal speed of the menu. More... | |
C_Texture * | splash |
The splash image. More... | |
C_Timer * | splashTimer |
The timer keeping the splash screen open. More... | |
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 splash screen.
S_Splash::S_Splash | ( | S_StateManager * | stateManager, |
SDL_Renderer * | renderer, | ||
C_Vec2 | dimensions, | ||
C_Music * | backgroundMusic | ||
) |
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. |
S_Splash::~S_Splash | ( | ) |
Destructs the State object.
|
virtual |
A function to draw the State to the screen.
Implements S_State.
|
virtual |
|
virtual |
A function to update the State.
dt | The delta time. |
Implements S_State.
|
private |
The background music.
|
private |
The splash image.
|
private |
The timer keeping the splash screen open.
|
private |
A pointer for the universal speed of the menu.