animacions noves de recuperació per als jugadors
This commit is contained in:
@@ -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
|
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]
|
||||||
|
|
||||||
[animation]
|
|
||||||
name=thank_you
|
|
||||||
speed=3
|
|
||||||
loop=-1
|
|
||||||
frames=42,42,43,44,45,46,46,46,45,44
|
|
||||||
[/animation]
|
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=dizzy
|
name=dizzy
|
||||||
speed=5
|
speed=5
|
||||||
@@ -127,9 +120,16 @@ loop=0
|
|||||||
frames=47,48,49,50,51,52,53
|
frames=47,48,49,50,51,52,53
|
||||||
[/animation]
|
[/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]
|
[animation]
|
||||||
name=hello
|
name=hello
|
||||||
speed=3
|
speed=3
|
||||||
loop=-1
|
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]
|
[/animation]
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@@ -181,7 +181,7 @@ void Player::move() {
|
|||||||
case State::WAITING:
|
case State::WAITING:
|
||||||
handleWaitingMovement();
|
handleWaitingMovement();
|
||||||
break;
|
break;
|
||||||
case State::THANK_YOU:
|
case State::RECOVER:
|
||||||
handleThankYouMovement();
|
handleThankYouMovement();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -475,8 +475,8 @@ void Player::setAnimation() {
|
|||||||
player_sprite_->setFlip(flipMode);
|
player_sprite_->setFlip(flipMode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case State::THANK_YOU:
|
case State::RECOVER:
|
||||||
player_sprite_->setCurrentAnimation("thank_you");
|
player_sprite_->setCurrentAnimation("recover");
|
||||||
break;
|
break;
|
||||||
case State::WAITING:
|
case State::WAITING:
|
||||||
case State::GAME_OVER:
|
case State::GAME_OVER:
|
||||||
@@ -640,7 +640,7 @@ void Player::setPlayingState(State state) {
|
|||||||
playing_state_ = state;
|
playing_state_ = state;
|
||||||
|
|
||||||
switch (playing_state_) {
|
switch (playing_state_) {
|
||||||
case State::THANK_YOU: {
|
case State::RECOVER: {
|
||||||
playSound("voice_thankyou.wav");
|
playSound("voice_thankyou.wav");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ class Player {
|
|||||||
CREDITS, // Estado para mostrar los créditos del juego
|
CREDITS, // Estado para mostrar los créditos del juego
|
||||||
TITLE_ANIMATION, // Animacion para el titulo
|
TITLE_ANIMATION, // Animacion para el titulo
|
||||||
TITLE_HIDDEN, // 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
|
RESPAWNING, // Tras continuar y dar las gracias, otorga inmunidad y vuelve al juego
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -115,8 +115,8 @@ class Player {
|
|||||||
|
|
||||||
// --- Puntuación y marcador ---
|
// --- Puntuación y marcador ---
|
||||||
void addScore(int score, int lowest_hi_score_entry); // Añade puntos
|
void addScore(int score, int lowest_hi_score_entry); // Añade puntos
|
||||||
void incScoreMultiplier(); // Incrementa el multiplicador
|
void incScoreMultiplier(); // Incrementa el multiplicador
|
||||||
void decScoreMultiplier(); // Decrementa el multiplicador
|
void decScoreMultiplier(); // Decrementa el multiplicador
|
||||||
|
|
||||||
// --- Estados de juego ---
|
// --- Estados de juego ---
|
||||||
void setPlayingState(State state); // Cambia el estado de juego
|
void setPlayingState(State state); // Cambia el estado de juego
|
||||||
|
|||||||
@@ -1402,12 +1402,12 @@ void Game::handleFireInputs(const std::shared_ptr<Player> &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.
|
// 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> &player) {
|
void Game::handlePlayerContinueInput(const std::shared_ptr<Player> &player) {
|
||||||
if (input_->checkAction(Input::Action::START, Input::DO_NOT_ALLOW_REPEAT, player->getUsesKeyboard(), player->getGamepad())) {
|
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();
|
player->addCredit();
|
||||||
sendPlayerToTheFront(player);
|
sendPlayerToTheFront(player);
|
||||||
// Crea letrero de THANK_YOU
|
// Crea letrero de THANK_YOU
|
||||||
const auto X = player->getPosX() + (player->getWidth() - game_text_textures_.at(7)->getWidth()) / 2;
|
//const auto X = player->getPosX() + (player->getWidth() - game_text_textures_.at(7)->getWidth()) / 2;
|
||||||
createItemText(X, game_text_textures_.at(7));
|
//createItemText(X, game_text_textures_.at(7));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disminuye el contador de continuación si se presiona cualquier botón de disparo.
|
// 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());
|
balloon_manager_->deployRandomFormation(stage_manager_->getCurrentStageIndex());
|
||||||
setMenace();
|
setMenace();
|
||||||
}
|
}
|
||||||
std::cout << "MT: " << menace_threshold_ << " | MC: " << menace_ << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calcula y establece el valor de amenaza en funcion de los globos activos
|
// Calcula y establece el valor de amenaza en funcion de los globos activos
|
||||||
|
|||||||
Reference in New Issue
Block a user