afegides notificacions per als inputs externs al joc

This commit is contained in:
2024-08-03 13:55:16 +02:00
parent 256959505d
commit 958a4d1d99
13 changed files with 78 additions and 33 deletions

View File

@@ -1899,9 +1899,6 @@ void Game::update()
// Actualiza el contador de ticks
ticks = SDL_GetTicks();
if (counter == 0)
createPowerBall();
// Actualiza el contador de juego
counter++;
@@ -2136,6 +2133,7 @@ void Game::checkInput()
else if (input->checkInput(input_reset, DO_NOT_ALLOW_REPEAT))
{
section->name = SECTION_PROG_LOGO;
screen->showNotification("Reset");
return;
}
@@ -2615,12 +2613,14 @@ bool Game::allPlayersAreDead()
// Comprueba los eventos que hay en cola
void Game::checkEvents()
{
#ifdef DEBUG
const Uint8 *keyStates = SDL_GetKeyboardState(nullptr);
if (keyStates[SDL_SCANCODE_H] != 0)
{
createItemScoreSprite(param->gameWidth / 2, param->gameWidth / 2, n1000Sprite);
}
#endif
while (SDL_PollEvent(eventHandler) != 0)
{