jugant amb clang-tidy
This commit is contained in:
@@ -174,8 +174,8 @@ void Player::move() {
|
||||
if (player_sprite_->getPosY() > play_area_.h - HEIGHT_) {
|
||||
if (player_sprite_->getVelY() < 2.0f) {
|
||||
// Si la velocidad de rebote es baja, lo detiene y cambia de estado
|
||||
const auto nextPlayerStatus = IsEligibleForHighScore() ? PlayerState::ENTERING_NAME : PlayerState::CONTINUE;
|
||||
demo_ ? setPlayingState(PlayerState::LYING_ON_THE_FLOOR_FOREVER) : setPlayingState(nextPlayerStatus);
|
||||
const auto NEXT_PLAYER_STATUS = IsEligibleForHighScore() ? PlayerState::ENTERING_NAME : PlayerState::CONTINUE;
|
||||
demo_ ? setPlayingState(PlayerState::LYING_ON_THE_FLOOR_FOREVER) : setPlayingState(NEXT_PLAYER_STATUS);
|
||||
pos_x_ = player_sprite_->getPosX();
|
||||
pos_y_ = default_pos_y_;
|
||||
player_sprite_->clear();
|
||||
@@ -791,14 +791,14 @@ void Player::playSound(const std::string &name) {
|
||||
if (demo_)
|
||||
return;
|
||||
|
||||
static auto audio = Audio::get();
|
||||
audio->playSound(name);
|
||||
static auto audio_ = Audio::get();
|
||||
audio_->playSound(name);
|
||||
}
|
||||
|
||||
// Añade una puntuación a la tabla de records
|
||||
void Player::addScoreToScoreBoard() {
|
||||
const auto entry = HiScoreEntry(trim(getLastEnterName()), getScore(), get1CC());
|
||||
const auto ENTRY = HiScoreEntry(trim(getLastEnterName()), getScore(), get1CC());
|
||||
auto manager = std::make_unique<ManageHiScoreTable>(Options::settings.hi_score_table);
|
||||
Options::settings.last_hi_score_entry.at(getId() - 1) = manager->add(entry);
|
||||
Options::settings.last_hi_score_entry.at(getId() - 1) = manager->add(ENTRY);
|
||||
manager->saveToFile(Asset::get()->get("score.bin"));
|
||||
}
|
||||
Reference in New Issue
Block a user