EngineLib
 All Classes Functions
Public Member Functions | List of all members
Score Class Reference

#include <Score.h>

Public Member Functions

 Score (SDL_Renderer *renderer)
 
int loadScore (const char *filename)
 
void drawScore (int x, int y, int score)
 

Detailed Description

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");

Member Function Documentation

void Score::drawScore ( int  x,
int  y,
int  score 
)

Draws the Score at x,y to the Screen.

Parameters
intx pos
inty pos
intscore

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.


The documentation for this class was generated from the following files: