fix: faltava passar el nom dels jugadors al marcador
This commit is contained in:
@@ -20,6 +20,7 @@ Scoreboard::Scoreboard(SDL_Renderer *renderer, Screen *screen, Asset *asset, Lan
|
||||
stage = 1;
|
||||
for (int i = 0; i< SCOREBOARD_MAX_PANELS; ++i)
|
||||
{
|
||||
name[i] = "";
|
||||
score[i] = 0;
|
||||
mult[i] = 0;
|
||||
continueCounter[i] = 0;
|
||||
@@ -137,6 +138,12 @@ void Scoreboard::render()
|
||||
SDL_RenderCopy(renderer, background, nullptr, &rect);
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
void Scoreboard::setName(int panel, std::string name)
|
||||
{
|
||||
this->name[panel] = name;
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
void Scoreboard::setScore(int panel, int score)
|
||||
{
|
||||
@@ -224,7 +231,7 @@ void Scoreboard::fillPanelTextures()
|
||||
{
|
||||
case SCOREBOARD_MODE_SCORE:
|
||||
// SCORE
|
||||
textScoreBoard->writeCentered(slot4_1.x, slot4_1.y, lang->getText(53));
|
||||
textScoreBoard->writeCentered(slot4_1.x, slot4_1.y, name[i]);
|
||||
textScoreBoard->writeCentered(slot4_2.x, slot4_2.y, updateScoreText(score[i]));
|
||||
|
||||
// MULT
|
||||
@@ -267,7 +274,7 @@ void Scoreboard::fillPanelTextures()
|
||||
|
||||
case SCOREBOARD_MODE_CONTINUE:
|
||||
// SCORE
|
||||
textScoreBoard->writeCentered(slot4_1.x, slot4_1.y, lang->getText(53));
|
||||
textScoreBoard->writeCentered(slot4_1.x, slot4_1.y, name[i]);
|
||||
textScoreBoard->writeCentered(slot4_2.x, slot4_2.y, updateScoreText(score[i]));
|
||||
|
||||
// CONTINUE
|
||||
|
||||
Reference in New Issue
Block a user