treballan en el carrusel per a posar el nom
This commit is contained in:
@@ -128,11 +128,11 @@ void Player::setInputPlaying(Input::Action action) {
|
||||
// Procesa inputs para cuando está introduciendo el nombre
|
||||
void Player::setInputEnteringName(Input::Action action) {
|
||||
switch (action) {
|
||||
case Input::Action::LEFT:
|
||||
enter_name_->decPosition();
|
||||
case Input::Action::FIRE_LEFT:
|
||||
enter_name_->addCharacter();
|
||||
break;
|
||||
case Input::Action::RIGHT:
|
||||
enter_name_->incPosition();
|
||||
case Input::Action::FIRE_CENTER:
|
||||
enter_name_->removeLastCharacter();
|
||||
break;
|
||||
case Input::Action::UP:
|
||||
enter_name_->incIndex();
|
||||
@@ -540,8 +540,9 @@ void Player::updateScoreboard() {
|
||||
}
|
||||
case State::ENTERING_NAME:
|
||||
case State::ENTERING_NAME_GAME_COMPLETED: {
|
||||
Scoreboard::get()->setRecordName(scoreboard_panel_, enter_name_->getCurrentName());
|
||||
Scoreboard::get()->setSelectorPos(scoreboard_panel_, getRecordNamePos());
|
||||
Scoreboard::get()->setEnterName(scoreboard_panel_, enter_name_->getCurrentName());
|
||||
Scoreboard::get()->setCharacterSelected(scoreboard_panel_, enter_name_->getSelectedCharacter());
|
||||
Scoreboard::get()->setCarousel(scoreboard_panel_, enter_name_->getCarousel(7));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -616,7 +617,7 @@ void Player::setPlayingState(State state) {
|
||||
case State::SHOWING_NAME: {
|
||||
showing_name_time_accumulator_ = 0.0f; // Inicializar acumulador time-based
|
||||
setScoreboardMode(Scoreboard::Mode::SHOW_NAME);
|
||||
Scoreboard::get()->setRecordName(scoreboard_panel_, last_enter_name_);
|
||||
Scoreboard::get()->setEnterName(scoreboard_panel_, last_enter_name_);
|
||||
addScoreToScoreBoard();
|
||||
break;
|
||||
}
|
||||
@@ -901,15 +902,6 @@ void Player::decNameEntryCounter() {
|
||||
}
|
||||
}
|
||||
|
||||
// Obtiene la posición que se está editando del nombre del jugador para la tabla de mejores puntuaciones
|
||||
auto Player::getRecordNamePos() const -> int {
|
||||
if (enter_name_) {
|
||||
return enter_name_->getPosition();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Recoloca los sprites
|
||||
void Player::shiftSprite() {
|
||||
player_sprite_->setPosX(pos_x_);
|
||||
|
||||
Reference in New Issue
Block a user