Player: afegides animacions per al estat WAITING
Player: si tires a jugar desde el estat WAITING passes al ENTERING_SCREEN i despres sempre tens inmunitat, fins i tot la primera volta (al començar el joc) falta: arregñar el z-order per al estat WAITING
This commit is contained in:
@@ -80,7 +80,7 @@ void Title::update() {
|
||||
if (SDL_GetTicks() - ticks_ > param.game.speed) {
|
||||
ticks_ = SDL_GetTicks();
|
||||
Screen::get()->update();
|
||||
|
||||
|
||||
updateFade();
|
||||
updateState();
|
||||
updateStartPrompt();
|
||||
@@ -308,7 +308,7 @@ void Title::processPlayer2Start() {
|
||||
}
|
||||
|
||||
void Title::activatePlayerAndSetState(int player_id) {
|
||||
getPlayer(player_id)->setPlayingState(PlayerState::TITLE_ANIMATION);
|
||||
getPlayer(player_id)->setPlayingState(Player::State::TITLE_ANIMATION);
|
||||
setState(TitleState::START_HAS_BEEN_PRESSED);
|
||||
counter_ = 0;
|
||||
}
|
||||
@@ -559,10 +559,10 @@ void Title::initPlayers() {
|
||||
const int Y = param.title.press_start_position - (PLAYER_HEIGHT / 2);
|
||||
constexpr bool DEMO = false;
|
||||
players_.emplace_back(std::make_unique<Player>(1, param.game.game_area.center_x - (PLAYER_WIDTH / 2), Y, DEMO, param.game.play_area.rect, player_textures.at(0), player_animations));
|
||||
players_.back()->setPlayingState(PlayerState::TITLE_HIDDEN);
|
||||
players_.back()->setPlayingState(Player::State::TITLE_HIDDEN);
|
||||
|
||||
players_.emplace_back(std::make_unique<Player>(2, param.game.game_area.center_x - (PLAYER_WIDTH / 2), Y, DEMO, param.game.play_area.rect, player_textures.at(1), player_animations));
|
||||
players_.back()->setPlayingState(PlayerState::TITLE_HIDDEN);
|
||||
players_.back()->setPlayingState(Player::State::TITLE_HIDDEN);
|
||||
}
|
||||
|
||||
// Actualza los jugadores
|
||||
|
||||
Reference in New Issue
Block a user