fix: la classe Screen ja ha recuperat un poc del lustro que tenia

shake effect ja no està fet "the torerous menner"
shake effect ja va amb shaders
This commit is contained in:
2024-10-06 18:57:47 +02:00
parent afe092c742
commit fe6e63e39f
4 changed files with 83 additions and 31 deletions

View File

@@ -56,7 +56,7 @@ Game::Game(int playerID, int currentStage, bool demo, JA_Music_t *music)
scoreboard = Scoreboard::get();
eventHandler = std::make_unique<SDL_Event>();
fade = std::make_unique<Fade>(renderer);
background = std::make_unique<Background>(renderer);
explosions = std::make_unique<Explosions>();
enemyFormations = std::make_unique<EnemyFormations>();
@@ -107,7 +107,7 @@ Game::~Game()
unloadMedia();
Scoreboard::destroy();
SDL_DestroyTexture(canvas);
}
@@ -2655,12 +2655,14 @@ void Game::checkEvents()
{
switch (eventHandler->key.keysym.sym)
{
// CREA UNA POWERBALL
// Crea una powerball
case SDLK_1:
{
createPowerBall();
break;
}
// CREA DOS BALLON4
// Crea dos BALLON4
case SDLK_2:
{
const int set = 0;
@@ -2678,11 +2680,27 @@ void Game::checkEvents()
}
break;
// ACTIVA EL MODO PARA PASAR EL JUEGO AUTOMATICAMENTE
// Activa el modo para pasar el juego automaticamente
case SDLK_3:
{
autoPopBalloons = !autoPopBalloons;
screen->showNotification("autoPopBalloons " + boolToString(autoPopBalloons));
break;
}
// Ralentiza mucho la lógica
case SDLK_4:
{
ticksSpeed *= 10;
break;
}
// Acelera mucho la lógica
case SDLK_5:
{
ticksSpeed /= 10;
break;
}
default:
break;