#include <Score.h>
Public Member Functions | |
Score (SDL_Renderer *renderer) | |
int | loadScore (const char *filename) |
void | drawScore (int x, int y, int score) |
Represents an Simple Object to draw Scores from an Image to the Screen.
This Image must contain 10 square images with numbers from 0-10 to be displayed correctly.
You need to initialize it with an SDL_Renderer before using it.
Usage:
Score *pscore=new Score(engine->getRenderer()); pscore->loadScore("myscorefile.png");
void Score::drawScore | ( | int | x, |
int | y, | ||
int | score | ||
) |
Draws the Score at x,y to the Screen.
int | x pos |
int | y pos |
int | score |
You need to initialize it with an SDL_Renderer before using it.
int Score::loadScore | ( | const char * | filename | ) |
Loads Score Image.
You need to initialize it with an SDL_Renderer before using it.