diff --git a/data/gfx/player/player.ani b/data/gfx/player/player.ani index b71632e..83facc3 100644 --- a/data/gfx/player/player.ani +++ b/data/gfx/player/player.ani @@ -113,13 +113,6 @@ loop=-1 frames=42,42,42,42,42,42,43,44,45,46,46,46,46,46,46,45,45,45,46,46,46,45,45,45,44,43,42,42,42 [/animation] -[animation] -name=thank_you -speed=3 -loop=-1 -frames=42,42,43,44,45,46,46,46,45,44 -[/animation] - [animation] name=dizzy speed=5 @@ -127,9 +120,16 @@ loop=0 frames=47,48,49,50,51,52,53 [/animation] +[animation] +name=recover +speed=3 +loop=-1 +frames=54,54,54,54,55,56,57,58,58,58,59,60,61,58,59,60,61,58,59,60,61,62,62,62,62 +[/animation] + [animation] name=hello speed=3 loop=-1 -frames=54,55,56,57,58,59,60,61,62,63,64,64,64,64,64,64,64,64,64,64,64,64,64,65,66,67,68,69,70,71,72,73,73,72,71,70,70,71,72,73,73,72,71,70,70,71,72,73,73,72,71,70,70,71,72,73,73,72,71,70,69,68,67,66,65,64,63,62,61,60,59,58,57,56,55,54 +frames=63,64,65,66,67,68,69,70,71,72,73,73,73,73,73,73,73,73,73,73,73,73,73,74,75,76,77,78,79,80,81,82,82,81,80,79,79,80,81,82,82,81,80,79,79,80,81,82,82,81,80,79,79,80,81,82,82,81,80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,63 [/animation] \ No newline at end of file diff --git a/data/gfx/player/player1.gif b/data/gfx/player/player1.gif index 0c6ae16..4766b3a 100644 Binary files a/data/gfx/player/player1.gif and b/data/gfx/player/player1.gif differ diff --git a/data/gfx/player/player2.gif b/data/gfx/player/player2.gif index 6413de7..8692f37 100644 Binary files a/data/gfx/player/player2.gif and b/data/gfx/player/player2.gif differ diff --git a/source/player.cpp b/source/player.cpp index 6a334c9..c8f4267 100644 --- a/source/player.cpp +++ b/source/player.cpp @@ -181,7 +181,7 @@ void Player::move() { case State::WAITING: handleWaitingMovement(); break; - case State::THANK_YOU: + case State::RECOVER: handleThankYouMovement(); break; default: @@ -475,8 +475,8 @@ void Player::setAnimation() { player_sprite_->setFlip(flipMode); break; } - case State::THANK_YOU: - player_sprite_->setCurrentAnimation("thank_you"); + case State::RECOVER: + player_sprite_->setCurrentAnimation("recover"); break; case State::WAITING: case State::GAME_OVER: @@ -640,7 +640,7 @@ void Player::setPlayingState(State state) { playing_state_ = state; switch (playing_state_) { - case State::THANK_YOU: { + case State::RECOVER: { playSound("voice_thankyou.wav"); break; } diff --git a/source/player.h b/source/player.h index be50ad6..3c6ca7f 100644 --- a/source/player.h +++ b/source/player.h @@ -72,7 +72,7 @@ class Player { CREDITS, // Estado para mostrar los créditos del juego TITLE_ANIMATION, // Animacion para el titulo TITLE_HIDDEN, // Animacion para el titulo - THANK_YOU, // Al aceptar continuar + RECOVER, // Al aceptar continuar RESPAWNING, // Tras continuar y dar las gracias, otorga inmunidad y vuelve al juego }; @@ -115,8 +115,8 @@ class Player { // --- Puntuación y marcador --- void addScore(int score, int lowest_hi_score_entry); // Añade puntos - void incScoreMultiplier(); // Incrementa el multiplicador - void decScoreMultiplier(); // Decrementa el multiplicador + void incScoreMultiplier(); // Incrementa el multiplicador + void decScoreMultiplier(); // Decrementa el multiplicador // --- Estados de juego --- void setPlayingState(State state); // Cambia el estado de juego diff --git a/source/sections/game.cpp b/source/sections/game.cpp index 8ff0e80..b75c407 100644 --- a/source/sections/game.cpp +++ b/source/sections/game.cpp @@ -1402,12 +1402,12 @@ void Game::handleFireInputs(const std::shared_ptr &player, bool autofire // Maneja la continuación del jugador cuando no está jugando, permitiendo que continúe si se pulsa el botón de inicio. void Game::handlePlayerContinueInput(const std::shared_ptr &player) { if (input_->checkAction(Input::Action::START, Input::DO_NOT_ALLOW_REPEAT, player->getUsesKeyboard(), player->getGamepad())) { - player->setPlayingState(Player::State::THANK_YOU); + player->setPlayingState(Player::State::RECOVER); player->addCredit(); sendPlayerToTheFront(player); // Crea letrero de THANK_YOU - const auto X = player->getPosX() + (player->getWidth() - game_text_textures_.at(7)->getWidth()) / 2; - createItemText(X, game_text_textures_.at(7)); + //const auto X = player->getPosX() + (player->getWidth() - game_text_textures_.at(7)->getWidth()) / 2; + //createItemText(X, game_text_textures_.at(7)); } // Disminuye el contador de continuación si se presiona cualquier botón de disparo. @@ -1794,7 +1794,6 @@ void Game::updateMenace() { balloon_manager_->deployRandomFormation(stage_manager_->getCurrentStageIndex()); setMenace(); } - std::cout << "MT: " << menace_threshold_ << " | MC: " << menace_ << std::endl; } // Calcula y establece el valor de amenaza en funcion de los globos activos