A State that contains and runs the Game. More...
#include <S_Game.h>
Public Member Functions | |
S_Game (S_StateManager *stateManager, SDL_Renderer *renderer, C_Vec2 dimensions, C_Music *backgroundMusic) | |
Constructs the Game State object. More... | |
~S_Game () | |
Destructs the Game State object. More... | |
bool | input () |
Handles the Game State input. More... | |
void | update (float dt) |
A function to update the Game State. More... | |
void | draw () |
A function to draw the Game 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 | resetGame () |
A function to reset the Game. More... | |
Private Attributes | |
C_Vec2 | mousePos |
The mouse position. More... | |
C_Music * | backgroundMusic |
The background music. More... | |
B_BackgroundManager * | background |
The Background. More... | |
EP_Player * | player |
The Player. More... | |
C_Texture * | playerSprite |
The Player textures. More... | |
C_Texture * | playerArcherSprite |
E_EntityManager * | entityManager |
The EntityManager. More... | |
G_Gameplay * | gameplay |
The Gameplay. More... | |
C_Texture * | scoreScroll |
The texture for the scoreScroll. More... | |
C_Texture * | healthScroll |
The texture for the healthScroll. More... | |
C_Text * | numOfCoins |
The number of coins text to be displayed. More... | |
C_Texture * | fireSprite |
The Fire Effect texture. More... | |
SDL_Colour | minFireTint |
The min tint colour for use with the fire effect. More... | |
SDL_Colour | maxFireTint |
The max tint colour for use with the fire effect. More... | |
float * | universalSpeed |
A pointer for the universal speed of the game. More... | |
UI_Button * | fireArrowButton |
The fire arrow button. More... | |
UI_Button * | helpButton |
The Help button. More... | |
C_Texture * | helpButtonSpritesheet |
The help button spritesheet. More... | |
C_Texture * | fireArrowButtonSpritesheet |
The fire arrow button spritesheet. 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 Game.
S_Game::S_Game | ( | S_StateManager * | stateManager, |
SDL_Renderer * | renderer, | ||
C_Vec2 | dimensions, | ||
C_Music * | backgroundMusic | ||
) |
Constructs the Game 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_Game::~S_Game | ( | ) |
Destructs the Game State object.
|
virtual |
A function to draw the Game State to the screen.
Implements S_State.
|
virtual |
Handles the Game State input.
Implements S_State.
|
private |
A function to reset the Game.
|
virtual |
A function to update the Game State.
dt | The delta time. |
Implements S_State.
|
private |
The Background.
|
private |
The background music.
|
private |
The EntityManager.
|
private |
The fire arrow button.
|
private |
The fire arrow button spritesheet.
|
private |
The Fire Effect texture.
|
private |
The Gameplay.
|
private |
The texture for the healthScroll.
|
private |
The Help button.
|
private |
The help button spritesheet.
|
private |
The max tint colour for use with the fire effect.
|
private |
The min tint colour for use with the fire effect.
|
private |
The mouse position.
|
private |
The number of coins text to be displayed.
|
private |
The Player.
|
private |
|
private |
The Player textures.
|
private |
The texture for the scoreScroll.
|
private |
A pointer for the universal speed of the game.