Breakout
|
Represents various score displayed in the game. More...
#include <PlayerScore.h>
Public Member Functions | |
PlayerScore (Vec2 position, SDL_Renderer *ren, TTF_Font *font) | |
The constructor for PlayerScore that takkes in Position, Renderer and font as an argument. More... | |
~PlayerScore () | |
The destructor for playerScore. More... | |
void | Draw () |
The method to draw or render the score on the screen. More... | |
void | SetScore (int score) |
The method to set and update score. More... | |
void | SetText (const char *text) |
The method to set and update text. More... | |
void | SetHeart () |
The method will load and set heart icon to indidcate lives left. More... | |
void | SetStar () |
This method will load and set star icon to indicate the points scored by the player. More... | |
void | setFlag (int language) |
This method will upload and set the flag icon for the language being used. More... | |
Represents various score displayed in the game.
PlayerScore::PlayerScore | ( | Vec2 | position, |
SDL_Renderer * | ren, | ||
TTF_Font * | font | ||
) |
The constructor for PlayerScore that takkes in Position, Renderer and font as an argument.
position | The x and y coordinates where the score would be rendered |
ren | The pointer to the SDL_Renderer for playerscore to be rendered |
font | The type of font to load into when rendering |
PlayerScore::~PlayerScore | ( | ) |
The destructor for playerScore.
void PlayerScore::Draw | ( | ) |
The method to draw or render the score on the screen.
void PlayerScore::setFlag | ( | int | language | ) |
This method will upload and set the flag icon for the language being used.
language | the code for the language. As of now 0 stands for french and 1 stands for english |
void PlayerScore::SetHeart | ( | ) |
The method will load and set heart icon to indidcate lives left.
void PlayerScore::SetScore | ( | int | score | ) |
The method to set and update score.
score | the score to be set or updated |
void PlayerScore::SetStar | ( | ) |
This method will load and set star icon to indicate the points scored by the player.
void PlayerScore::SetText | ( | const char * | text | ) |
The method to set and update text.
text | the text to be set or updated |