Nova animació per a la mort del personatge
Nova lògica al morir
This commit is contained in:
@@ -350,7 +350,7 @@ void Game::updateCompletedState()
|
||||
for (auto &player : players_)
|
||||
if (player->isCelebrating())
|
||||
{
|
||||
player->setPlayingState(player->IsEligibleForHighScore() ? PlayerState::ENTERING_NAME_GAME_COMPLETED : PlayerState::GAME_COMPLETED);
|
||||
player->setPlayingState(player->IsEligibleForHighScore() ? PlayerState::ENTERING_NAME_GAME_COMPLETED : PlayerState::LEAVING_SCREEN);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1166,7 +1166,7 @@ void Game::checkEvents()
|
||||
}
|
||||
case SDLK_8:
|
||||
{
|
||||
players_.at(0)->setPlayingState(PlayerState::GAME_COMPLETED);
|
||||
players_.at(0)->setPlayingState(PlayerState::LEAVING_SCREEN);
|
||||
}
|
||||
default:
|
||||
break;
|
||||
@@ -1494,7 +1494,7 @@ void Game::handleNameInput(const std::shared_ptr<Player> &player)
|
||||
player->setInput(InputType::START);
|
||||
addScoreToScoreBoard(player->getRecordName(), player->getScore());
|
||||
const auto status = player->getPlayingState();
|
||||
player->setPlayingState(status == PlayerState::ENTERING_NAME ? PlayerState::CONTINUE : PlayerState::GAME_COMPLETED);
|
||||
player->setPlayingState(status == PlayerState::ENTERING_NAME ? PlayerState::CONTINUE : PlayerState::LEAVING_SCREEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1518,7 +1518,7 @@ void Game::handleNameInput(const std::shared_ptr<Player> &player)
|
||||
player->setInput(InputType::START);
|
||||
addScoreToScoreBoard(player->getRecordName(), player->getScore());
|
||||
const auto status = player->getPlayingState();
|
||||
player->setPlayingState(status == PlayerState::ENTERING_NAME ? PlayerState::CONTINUE : PlayerState::GAME_COMPLETED);
|
||||
player->setPlayingState(status == PlayerState::ENTERING_NAME ? PlayerState::CONTINUE : PlayerState::LEAVING_SCREEN);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user