Afegit global_events.cpp

This commit is contained in:
2025-03-10 23:24:00 +01:00
parent 9d98d3ea6a
commit 482dc3de54
26 changed files with 197 additions and 530 deletions

View File

@@ -2,6 +2,7 @@
#include <SDL2/SDL_render.h> // Para SDL_Renderer, SDL_Texture
#include <SDL2/SDL_stdinc.h> // Para Uint32, Uint8
#include <SDL2/SDL_events.h> // Para SDL_PollEvent, SDL_Event, SDL_KEYDOWN
#include <memory> // Para shared_ptr, unique_ptr
#include <string> // Para string
#include <vector> // Para vector
@@ -173,6 +174,9 @@ private:
GameState state_ = GameState::FADE_IN; // Estado
#ifdef DEBUG
bool auto_pop_balloons_ = false; // Si es true, incrementa automaticamente los globos explotados
// Comprueba los eventos en el modo DEBUG
void checkDebugEvents(const SDL_Event &event);
#endif
// Actualiza el juego
@@ -298,9 +302,6 @@ private:
// Comprueba si todos los jugadores han terminado de jugar
bool allPlayersAreNotPlaying();
// Recarga las texturas
void reloadTextures();
// Actualiza el marcador
void updateScoreboard();