Movidos los efectos shake y flash de la clase game a la clase screen
This commit is contained in:
@@ -20,20 +20,20 @@ Screen::Screen(SDL_Window *window, SDL_Renderer *renderer, Asset *asset, options
|
|||||||
borderHeight = options->video.border.height * 2;
|
borderHeight = options->video.border.height * 2;
|
||||||
dest = {0, 0, 0, 0};
|
dest = {0, 0, 0, 0};
|
||||||
borderColor = {0, 0, 0};
|
borderColor = {0, 0, 0};
|
||||||
fade.enabled = false;
|
fadeEffect.enabled = false;
|
||||||
fade.counter = 0;
|
fadeEffect.counter = 0;
|
||||||
fade.lenght = 0;
|
fadeEffect.lenght = 0;
|
||||||
fade.color = {0xFF, 0xFF, 0xFF};
|
fadeEffect.color = {0xFF, 0xFF, 0xFF};
|
||||||
flash.enabled = false;
|
flashEffect.enabled = false;
|
||||||
flash.counter = 0;
|
flashEffect.counter = 0;
|
||||||
flash.lenght = 0;
|
flashEffect.lenght = 0;
|
||||||
flash.color = {0xFF, 0xFF, 0xFF};
|
flashEffect.color = {0xFF, 0xFF, 0xFF};
|
||||||
shake.desp = 1;
|
shakeEffect.desp = 1;
|
||||||
shake.delay = 3;
|
shakeEffect.delay = 3;
|
||||||
shake.counter = 0;
|
shakeEffect.counter = 0;
|
||||||
shake.lenght = 8;
|
shakeEffect.lenght = 8;
|
||||||
shake.remaining = 0;
|
shakeEffect.remaining = 0;
|
||||||
shake.origin = 0;
|
shakeEffect.origin = 0;
|
||||||
|
|
||||||
iniFade();
|
iniFade();
|
||||||
|
|
||||||
@@ -178,8 +178,8 @@ void Screen::setVideoMode(int videoMode)
|
|||||||
options->video.window.width = windowWidth;
|
options->video.window.width = windowWidth;
|
||||||
options->video.window.height = windowHeight;
|
options->video.window.height = windowHeight;
|
||||||
|
|
||||||
// Recalcula los valores de los efectos
|
// Actualiza variables
|
||||||
setShake();
|
shakeEffect.origin = dest.x;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Camibia entre pantalla completa y ventana
|
// Camibia entre pantalla completa y ventana
|
||||||
@@ -252,13 +252,13 @@ void Screen::switchBorder()
|
|||||||
// Activa el fade
|
// Activa el fade
|
||||||
void Screen::setFade()
|
void Screen::setFade()
|
||||||
{
|
{
|
||||||
fade.enabled = true;
|
fadeEffect.enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Comprueba si ha terminado el fade
|
// Comprueba si ha terminado el fade
|
||||||
bool Screen::fadeEnded()
|
bool Screen::fadeEnded()
|
||||||
{
|
{
|
||||||
if (fade.enabled || fade.counter > 0)
|
if (fadeEffect.enabled || fadeEffect.counter > 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -269,21 +269,21 @@ bool Screen::fadeEnded()
|
|||||||
// Inicializa las variables para el fade
|
// Inicializa las variables para el fade
|
||||||
void Screen::iniFade()
|
void Screen::iniFade()
|
||||||
{
|
{
|
||||||
fade.enabled = false;
|
fadeEffect.enabled = false;
|
||||||
fade.counter = 0;
|
fadeEffect.counter = 0;
|
||||||
fade.lenght = 200;
|
fadeEffect.lenght = 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actualiza el fade
|
// Actualiza el fade
|
||||||
void Screen::updateFade()
|
void Screen::updateFade()
|
||||||
{
|
{
|
||||||
if (!fade.enabled)
|
if (!fadeEffect.enabled)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fade.counter++;
|
fadeEffect.counter++;
|
||||||
if (fade.counter > fade.lenght)
|
if (fadeEffect.counter > fadeEffect.lenght)
|
||||||
{
|
{
|
||||||
iniFade();
|
iniFade();
|
||||||
}
|
}
|
||||||
@@ -292,14 +292,14 @@ void Screen::updateFade()
|
|||||||
// Dibuja el fade
|
// Dibuja el fade
|
||||||
void Screen::renderFade()
|
void Screen::renderFade()
|
||||||
{
|
{
|
||||||
if (!fade.enabled)
|
if (!fadeEffect.enabled)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const SDL_Rect rect = {0, 0, gameCanvasWidth, gameCanvasHeight};
|
const SDL_Rect rect = {0, 0, gameCanvasWidth, gameCanvasHeight};
|
||||||
color_t color = {0, 0, 0};
|
color_t color = {0, 0, 0};
|
||||||
const float step = (float)fade.counter / (float)fade.lenght;
|
const float step = (float)fadeEffect.counter / (float)fadeEffect.lenght;
|
||||||
const int alpha = 0 + (255 - 0) * step;
|
const int alpha = 0 + (255 - 0) * step;
|
||||||
SDL_SetRenderDrawColor(renderer, color.r, color.g, color.b, alpha);
|
SDL_SetRenderDrawColor(renderer, color.r, color.g, color.b, alpha);
|
||||||
SDL_RenderFillRect(renderer, &rect);
|
SDL_RenderFillRect(renderer, &rect);
|
||||||
@@ -325,65 +325,65 @@ void Screen::update()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Agita la pantalla
|
// Agita la pantalla
|
||||||
void Screen::setShake()
|
void Screen::shake()
|
||||||
{
|
{
|
||||||
shake.remaining = shake.lenght;
|
shakeEffect.remaining = shakeEffect.lenght;
|
||||||
shake.counter = shake.delay;
|
shakeEffect.counter = shakeEffect.delay;
|
||||||
shake.origin = dest.x;
|
shakeEffect.origin = dest.x;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actualiza la logica para agitar la pantalla
|
// Actualiza la logica para agitar la pantalla
|
||||||
void Screen::updateShake()
|
void Screen::updateShake()
|
||||||
{
|
{
|
||||||
if (shake.remaining > 0)
|
if (shakeEffect.remaining > 0)
|
||||||
{
|
{
|
||||||
if (shake.counter > 0)
|
if (shakeEffect.counter > 0)
|
||||||
{
|
{
|
||||||
shake.counter--;
|
shakeEffect.counter--;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shake.counter = shake.delay;
|
shakeEffect.counter = shakeEffect.delay;
|
||||||
const int desp = shake.remaining % 2 == 0 ? shake.desp * (-1) : shake.desp;
|
const int desp = shakeEffect.remaining % 2 == 0 ? shakeEffect.desp * (-1) : shakeEffect.desp;
|
||||||
dest.x = shake.origin + desp;
|
dest.x = shakeEffect.origin + desp;
|
||||||
shake.remaining--;
|
shakeEffect.remaining--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dest.x = shake.origin;
|
dest.x = shakeEffect.origin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pone la pantalla de color
|
// Pone la pantalla de color
|
||||||
void Screen::setFlash(color_t color, int lenght)
|
void Screen::flash(color_t color, int lenght)
|
||||||
{
|
{
|
||||||
flash.enabled = true;
|
flashEffect.enabled = true;
|
||||||
flash.counter = 0;
|
flashEffect.counter = 0;
|
||||||
flash.lenght = lenght;
|
flashEffect.lenght = lenght;
|
||||||
flash.color = color;
|
flashEffect.color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actualiza y dibuja el efecto de flash en la pantalla
|
// Actualiza y dibuja el efecto de flash en la pantalla
|
||||||
void Screen::doFlash()
|
void Screen::doFlash()
|
||||||
{
|
{
|
||||||
if (flash.enabled)
|
if (flashEffect.enabled)
|
||||||
{
|
{
|
||||||
// Dibuja el color del flash en la textura
|
// Dibuja el color del flash en la textura
|
||||||
SDL_Texture *temp = SDL_GetRenderTarget(renderer);
|
SDL_Texture *temp = SDL_GetRenderTarget(renderer);
|
||||||
SDL_SetRenderTarget(renderer, gameCanvas);
|
SDL_SetRenderTarget(renderer, gameCanvas);
|
||||||
SDL_SetRenderDrawColor(renderer, flash.color.r, flash.color.g, flash.color.b, 0xFF);
|
SDL_SetRenderDrawColor(renderer, flashEffect.color.r, flashEffect.color.g, flashEffect.color.b, 0xFF);
|
||||||
SDL_RenderClear(renderer);
|
SDL_RenderClear(renderer);
|
||||||
SDL_SetRenderTarget(renderer, temp);
|
SDL_SetRenderTarget(renderer, temp);
|
||||||
|
|
||||||
// Actualiza la lógica del efecto
|
// Actualiza la lógica del efecto
|
||||||
if (flash.counter < flash.lenght)
|
if (flashEffect.counter < flashEffect.lenght)
|
||||||
{
|
{
|
||||||
flash.counter++;
|
flashEffect.counter++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
flash.enabled = false;
|
flashEffect.enabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -41,8 +41,8 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Variables - Efectos
|
// Variables - Efectos
|
||||||
effect_t fade; // Variable para gestionar el efecto de fade
|
effect_t fadeEffect; // Variable para gestionar el efecto de fade
|
||||||
effect_t flash; // Variable para gestionar el efecto de flash
|
effect_t flashEffect; // Variable para gestionar el efecto de flash
|
||||||
|
|
||||||
struct shake_t
|
struct shake_t
|
||||||
{
|
{
|
||||||
@@ -52,7 +52,7 @@ private:
|
|||||||
int lenght; // Cantidad de desplazamientos a realizar
|
int lenght; // Cantidad de desplazamientos a realizar
|
||||||
int remaining; // Cantidad de desplazamientos pendientes a realizar
|
int remaining; // Cantidad de desplazamientos pendientes a realizar
|
||||||
int origin; // Valor inicial de la pantalla para dejarla igual tras el desplazamiento
|
int origin; // Valor inicial de la pantalla para dejarla igual tras el desplazamiento
|
||||||
} shake;
|
} shakeEffect;
|
||||||
|
|
||||||
// Inicializa las variables para el fade
|
// Inicializa las variables para el fade
|
||||||
void iniFade();
|
void iniFade();
|
||||||
@@ -132,10 +132,10 @@ public:
|
|||||||
bool fadeEnded();
|
bool fadeEnded();
|
||||||
|
|
||||||
// Agita la pantalla
|
// Agita la pantalla
|
||||||
void setShake();
|
void shake();
|
||||||
|
|
||||||
// Pone la pantalla de color
|
// Pone la pantalla de color
|
||||||
void setFlash(color_t color, int lenght);
|
void flash(color_t color, int lenght);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -72,5 +72,6 @@ const color_t scoreboardColor = {46, 63, 71};
|
|||||||
const color_t difficultyEasyColor = {75, 105, 47};
|
const color_t difficultyEasyColor = {75, 105, 47};
|
||||||
const color_t difficultyNormalColor = {255, 122, 0};
|
const color_t difficultyNormalColor = {255, 122, 0};
|
||||||
const color_t difficultyHardColor = {118, 66, 138};
|
const color_t difficultyHardColor = {118, 66, 138};
|
||||||
|
const color_t flashColor = {0xFF, 0xFF, 0xFF};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -244,9 +244,6 @@ void Game::init()
|
|||||||
lastEnemyDeploy = 0;
|
lastEnemyDeploy = 0;
|
||||||
enemyDeployCounter = 0;
|
enemyDeployCounter = 0;
|
||||||
enemySpeed = defaultEnemySpeed;
|
enemySpeed = defaultEnemySpeed;
|
||||||
effect.flash = false;
|
|
||||||
effect.shake = false;
|
|
||||||
effect.shakeCounter = SHAKE_COUNTER;
|
|
||||||
helper.needCoffee = false;
|
helper.needCoffee = false;
|
||||||
helper.needCoffeeMachine = false;
|
helper.needCoffeeMachine = false;
|
||||||
helper.needPowerBall = false;
|
helper.needPowerBall = false;
|
||||||
@@ -1620,8 +1617,8 @@ void Game::updateStage()
|
|||||||
stageBitmapCounter = 0;
|
stageBitmapCounter = 0;
|
||||||
enemySpeed = defaultEnemySpeed;
|
enemySpeed = defaultEnemySpeed;
|
||||||
setBalloonSpeed(enemySpeed);
|
setBalloonSpeed(enemySpeed);
|
||||||
effect.flash = true;
|
screen->flash(flashColor, 5);
|
||||||
effect.shake = true;
|
screen->shake();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Incrementa el contador del bitmap que aparece mostrando el cambio de fase
|
// Incrementa el contador del bitmap que aparece mostrando el cambio de fase
|
||||||
@@ -1999,8 +1996,8 @@ void Game::destroyAllBalloons()
|
|||||||
|
|
||||||
enemyDeployCounter = 255;
|
enemyDeployCounter = 255;
|
||||||
JA_PlaySound(powerBallSound);
|
JA_PlaySound(powerBallSound);
|
||||||
effect.flash = true;
|
screen->flash(flashColor, 5);
|
||||||
effect.shake = true;
|
screen->shake();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Detiene todos los globos
|
// Detiene todos los globos
|
||||||
@@ -2263,7 +2260,7 @@ void Game::updateItems()
|
|||||||
if (item->isOnFloor())
|
if (item->isOnFloor())
|
||||||
{
|
{
|
||||||
JA_PlaySound(coffeeMachineSound);
|
JA_PlaySound(coffeeMachineSound);
|
||||||
effect.shake = true;
|
screen->shake();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2409,36 +2406,6 @@ void Game::freeSmartSprites()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dibuja el efecto de flash
|
|
||||||
void Game::renderFlashEffect()
|
|
||||||
{
|
|
||||||
if (effect.flash)
|
|
||||||
{
|
|
||||||
// Pantallazo blanco
|
|
||||||
SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF);
|
|
||||||
SDL_RenderClear(renderer);
|
|
||||||
|
|
||||||
effect.flash = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Actualiza el efecto de agitar la pantalla
|
|
||||||
void Game::updateShakeEffect()
|
|
||||||
{
|
|
||||||
if (effect.shake)
|
|
||||||
{
|
|
||||||
if (effect.shakeCounter > 0)
|
|
||||||
{
|
|
||||||
effect.shakeCounter--;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
effect.shake = false;
|
|
||||||
effect.shakeCounter = SHAKE_COUNTER;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Crea un SmartSprite para arrojar el item café al recibir un impacto
|
// Crea un SmartSprite para arrojar el item café al recibir un impacto
|
||||||
void Game::throwCoffee(int x, int y)
|
void Game::throwCoffee(int x, int y)
|
||||||
{
|
{
|
||||||
@@ -2491,13 +2458,14 @@ void Game::killPlayer(Player *player)
|
|||||||
player->removeExtraHit();
|
player->removeExtraHit();
|
||||||
throwCoffee(player->getPosX() + (player->getWidth() / 2), player->getPosY() + (player->getHeight() / 2));
|
throwCoffee(player->getPosX() + (player->getWidth() / 2), player->getPosY() + (player->getHeight() / 2));
|
||||||
JA_PlaySound(coffeeOutSound);
|
JA_PlaySound(coffeeOutSound);
|
||||||
|
screen->shake();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
JA_PauseMusic();
|
JA_PauseMusic();
|
||||||
stopAllBalloons(10);
|
stopAllBalloons(10);
|
||||||
JA_PlaySound(playerCollisionSound);
|
JA_PlaySound(playerCollisionSound);
|
||||||
shakeScreen();
|
screen->shake();
|
||||||
JA_PlaySound(coffeeOutSound);
|
JA_PlaySound(coffeeOutSound);
|
||||||
player->setAlive(false);
|
player->setAlive(false);
|
||||||
if (allPlayersAreDead())
|
if (allPlayersAreDead())
|
||||||
@@ -2629,7 +2597,6 @@ void Game::update()
|
|||||||
// Actualiza los contadores de estado y efectos
|
// Actualiza los contadores de estado y efectos
|
||||||
updateTimeStoppedCounter();
|
updateTimeStoppedCounter();
|
||||||
updateEnemyDeployCounter();
|
updateEnemyDeployCounter();
|
||||||
updateShakeEffect();
|
|
||||||
|
|
||||||
// Actualiza el ayudante
|
// Actualiza el ayudante
|
||||||
updateHelper();
|
updateHelper();
|
||||||
@@ -2718,31 +2685,33 @@ void Game::fillCanvas()
|
|||||||
// Dibuja el juego
|
// Dibuja el juego
|
||||||
void Game::render()
|
void Game::render()
|
||||||
{
|
{
|
||||||
// Dibuja la zona de juego y el marcador
|
// Dibuja los graficos de la zona de juego en la textura
|
||||||
fillCanvas();
|
fillCanvas();
|
||||||
|
|
||||||
// Prepara para empezar a dibujar en la textura de juego
|
// Prepara para empezar a dibujar en la textura de juego
|
||||||
screen->start();
|
screen->start();
|
||||||
|
|
||||||
// Limpia la pantalla
|
// Copia la textura con la zona de juego a la pantalla
|
||||||
screen->clean(bgColor);
|
|
||||||
|
|
||||||
SDL_RenderCopy(renderer, canvas, nullptr, &playArea);
|
SDL_RenderCopy(renderer, canvas, nullptr, &playArea);
|
||||||
|
|
||||||
|
// Dibuja el marcador
|
||||||
scoreboard->render();
|
scoreboard->render();
|
||||||
|
|
||||||
|
// Dibuja el separador del marcador de la zona de juego
|
||||||
renderSeparator();
|
renderSeparator();
|
||||||
|
|
||||||
|
// Dibuja el sprite del jugador al morir
|
||||||
if ((deathCounter <= 150) && !players[0]->isAlive())
|
if ((deathCounter <= 150) && !players[0]->isAlive())
|
||||||
{
|
{
|
||||||
renderDeathFade(150 - deathCounter);
|
renderDeathFade(150 - deathCounter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Dibuja el fade de fin de juego
|
||||||
if ((gameCompleted) && (gameCompletedCounter >= GAME_COMPLETED_START_FADE))
|
if ((gameCompleted) && (gameCompletedCounter >= GAME_COMPLETED_START_FADE))
|
||||||
{
|
{
|
||||||
renderDeathFade(gameCompletedCounter - GAME_COMPLETED_START_FADE);
|
renderDeathFade(gameCompletedCounter - GAME_COMPLETED_START_FADE);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderFlashEffect();
|
|
||||||
|
|
||||||
// Vuelca el contenido del renderizador en pantalla
|
// Vuelca el contenido del renderizador en pantalla
|
||||||
screen->blit();
|
screen->blit();
|
||||||
}
|
}
|
||||||
@@ -3060,12 +3029,6 @@ void Game::disableTimeStopItem()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Agita la pantalla
|
|
||||||
void Game::shakeScreen()
|
|
||||||
{
|
|
||||||
screen->setShake();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Bucle para el juego
|
// Bucle para el juego
|
||||||
void Game::run()
|
void Game::run()
|
||||||
{
|
{
|
||||||
@@ -3208,8 +3171,6 @@ void Game::renderPausedGame()
|
|||||||
{
|
{
|
||||||
renderDeathFade(gameCompletedCounter - GAME_COMPLETED_START_FADE);
|
renderDeathFade(gameCompletedCounter - GAME_COMPLETED_START_FADE);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderFlashEffect();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (leavingPauseMenu)
|
if (leavingPauseMenu)
|
||||||
|
|||||||
@@ -87,13 +87,6 @@ private:
|
|||||||
Uint8 number; // Numero de fase
|
Uint8 number; // Numero de fase
|
||||||
};
|
};
|
||||||
|
|
||||||
struct effect_t
|
|
||||||
{
|
|
||||||
bool flash; // Indica si se ha de pintar la pantalla de blanco
|
|
||||||
bool shake; // Indica si se ha de agitar la pantalla
|
|
||||||
Uint8 shakeCounter; // Contador para medir el tiempo que dura el efecto
|
|
||||||
};
|
|
||||||
|
|
||||||
struct helper_t
|
struct helper_t
|
||||||
{
|
{
|
||||||
bool needCoffee; // Indica si se necesitan cafes
|
bool needCoffee; // Indica si se necesitan cafes
|
||||||
@@ -209,7 +202,6 @@ private:
|
|||||||
int enemyDeployCounter; // Cuando se lanza una formación, se le da un valor y no sale otra hasta que llegue a cero
|
int enemyDeployCounter; // Cuando se lanza una formación, se le da un valor y no sale otra hasta que llegue a cero
|
||||||
float enemySpeed; // Velocidad a la que se mueven los enemigos
|
float enemySpeed; // Velocidad a la que se mueven los enemigos
|
||||||
float defaultEnemySpeed; // Velocidad base de los enemigos, sin incrementar
|
float defaultEnemySpeed; // Velocidad base de los enemigos, sin incrementar
|
||||||
effect_t effect; // Variable para gestionar los efectos visuales
|
|
||||||
helper_t helper; // Variable para gestionar las ayudas
|
helper_t helper; // Variable para gestionar las ayudas
|
||||||
bool powerBallEnabled; // Indica si hay una powerball ya activa
|
bool powerBallEnabled; // Indica si hay una powerball ya activa
|
||||||
Uint8 powerBallCounter; // Contador de formaciones enemigas entre la aparicion de una PowerBall y otra
|
Uint8 powerBallCounter; // Contador de formaciones enemigas entre la aparicion de una PowerBall y otra
|
||||||
@@ -382,12 +374,6 @@ private:
|
|||||||
// Vacia el vector de smartsprites
|
// Vacia el vector de smartsprites
|
||||||
void freeSmartSprites();
|
void freeSmartSprites();
|
||||||
|
|
||||||
// Dibuja el efecto de flash
|
|
||||||
void renderFlashEffect();
|
|
||||||
|
|
||||||
// Actualiza el efecto de agitar la pantalla
|
|
||||||
void updateShakeEffect();
|
|
||||||
|
|
||||||
// Crea un SmartSprite para arrojar el item café al recibir un impacto
|
// Crea un SmartSprite para arrojar el item café al recibir un impacto
|
||||||
void throwCoffee(int x, int y);
|
void throwCoffee(int x, int y);
|
||||||
|
|
||||||
@@ -442,9 +428,6 @@ private:
|
|||||||
// Deshabilita el efecto del item de detener el tiempo
|
// Deshabilita el efecto del item de detener el tiempo
|
||||||
void disableTimeStopItem();
|
void disableTimeStopItem();
|
||||||
|
|
||||||
// Agita la pantalla
|
|
||||||
void shakeScreen();
|
|
||||||
|
|
||||||
// Actualiza las variables del menu de pausa del juego
|
// Actualiza las variables del menu de pausa del juego
|
||||||
void updatePausedGame();
|
void updatePausedGame();
|
||||||
|
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ void GameLogo::update()
|
|||||||
status = shaking;
|
status = shaking;
|
||||||
|
|
||||||
// Pantallazo blanco
|
// Pantallazo blanco
|
||||||
screen->setFlash({0xFF, 0xFF, 0xFF}, 5);
|
screen->flash(flashColor, 5);
|
||||||
|
|
||||||
// Reproduce el efecto sonoro
|
// Reproduce el efecto sonoro
|
||||||
JA_PlaySound(crashSound);
|
JA_PlaySound(crashSound);
|
||||||
|
|||||||
Reference in New Issue
Block a user