style: ja hi ha un caracter per acabar de posar el nom
This commit is contained in:
@@ -1438,46 +1438,28 @@ void Game::handlePlayerWaitingInput(const std::shared_ptr<Player>& player) {
|
||||
// Procesa las entradas para la introducción del nombre del jugador.
|
||||
void Game::handleNameInput(const std::shared_ptr<Player>& player) {
|
||||
if (input_->checkAction(Input::Action::FIRE_LEFT, Input::DO_NOT_ALLOW_REPEAT, player->getUsesKeyboard(), player->getGamepad())) {
|
||||
if (player->isShowingName()) {
|
||||
player->passShowingName();
|
||||
return;
|
||||
}
|
||||
player->setInput(Input::Action::FIRE_LEFT);
|
||||
playSound("service_menu_select.wav");
|
||||
return;
|
||||
}
|
||||
|
||||
if (input_->checkAction(Input::Action::FIRE_CENTER, Input::DO_NOT_ALLOW_REPEAT, player->getUsesKeyboard(), player->getGamepad()) ||
|
||||
input_->checkAction(Input::Action::FIRE_RIGHT, Input::DO_NOT_ALLOW_REPEAT, player->getUsesKeyboard(), player->getGamepad())) {
|
||||
if (player->isShowingName()) {
|
||||
player->passShowingName();
|
||||
return;
|
||||
}
|
||||
player->setInput(Input::Action::FIRE_CENTER);
|
||||
playSound("service_menu_back.wav");
|
||||
return;
|
||||
}
|
||||
|
||||
if (input_->checkAction(Input::Action::LEFT, Input::DO_NOT_ALLOW_REPEAT, player->getUsesKeyboard(), player->getGamepad())) {
|
||||
player->setInput(Input::Action::LEFT);
|
||||
playSound("service_menu_move.wav");
|
||||
return;
|
||||
}
|
||||
|
||||
if (input_->checkAction(Input::Action::RIGHT, Input::DO_NOT_ALLOW_REPEAT, player->getUsesKeyboard(), player->getGamepad())) {
|
||||
player->setInput(Input::Action::RIGHT);
|
||||
playSound("service_menu_move.wav");
|
||||
return;
|
||||
}
|
||||
|
||||
if (input_->checkAction(Input::Action::START, Input::DO_NOT_ALLOW_REPEAT, player->getUsesKeyboard(), player->getGamepad())) {
|
||||
if (player->isShowingName()) {
|
||||
player->passShowingName();
|
||||
return;
|
||||
}
|
||||
player->setInput(Input::Action::START);
|
||||
player->setPlayingState(Player::State::SHOWING_NAME);
|
||||
playSound("name_input_accept.wav");
|
||||
updateHiScoreName();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user