Els panels dels marcadors ja passen a game over sense pasar per waiting un frame gracies a una parafernalia que he montat
This commit is contained in:
@@ -15,19 +15,19 @@ Scoreboard *Scoreboard::scoreboard = nullptr;
|
||||
// [SINGLETON] Crearemos el objeto scoreboard con esta función estática
|
||||
void Scoreboard::init(SDL_Renderer *renderer)
|
||||
{
|
||||
Scoreboard::scoreboard = new Scoreboard(renderer);
|
||||
Scoreboard::scoreboard = new Scoreboard(renderer);
|
||||
}
|
||||
|
||||
// [SINGLETON] Destruiremos el objeto scoreboard con esta función estática
|
||||
void Scoreboard::destroy()
|
||||
{
|
||||
delete Scoreboard::scoreboard;
|
||||
delete Scoreboard::scoreboard;
|
||||
}
|
||||
|
||||
// [SINGLETON] Con este método obtenemos el objeto scoreboard y podemos trabajar con él
|
||||
Scoreboard *Scoreboard::get()
|
||||
{
|
||||
return Scoreboard::scoreboard;
|
||||
return Scoreboard::scoreboard;
|
||||
}
|
||||
|
||||
// Constructor
|
||||
@@ -263,7 +263,7 @@ void Scoreboard::fillPanelTextures()
|
||||
switch (panel[i].mode)
|
||||
{
|
||||
case scoreboardMode::SCORE:
|
||||
{
|
||||
{
|
||||
// SCORE
|
||||
textScoreBoard->writeCentered(slot4_1.x, slot4_1.y, name[i]);
|
||||
textScoreBoard->writeCentered(slot4_2.x, slot4_2.y, updateScoreText(score[i]));
|
||||
@@ -306,7 +306,13 @@ void Scoreboard::fillPanelTextures()
|
||||
{
|
||||
// GAME OVER
|
||||
textScoreBoard->writeCentered(slot4_1.x, slot4_1.y + 4, lang::getText(102));
|
||||
textScoreBoard->writeCentered(slot4_3.x, slot4_3.y + 4, lang::getText(114));
|
||||
|
||||
// PLEASE WAIT
|
||||
if (counter % 10 < 8)
|
||||
{
|
||||
textScoreBoard->writeCentered(slot4_3.x, slot4_3.y - 2, lang::getText(114));
|
||||
textScoreBoard->writeCentered(slot4_4.x, slot4_4.y - 2, lang::getText(115));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user