eliminat codi mort
This commit is contained in:
@@ -190,7 +190,7 @@ void Intro::updateScene5() {
|
||||
|
||||
// Acaba la ultima imagen
|
||||
if (card_sprites_.at(5)->hasFinished() && texts_.at(8)->hasFinished()) {
|
||||
state_ = IntroState::POST;
|
||||
state_ = State::POST;
|
||||
state_start_time_ = SDL_GetTicks();
|
||||
}
|
||||
}
|
||||
@@ -215,13 +215,13 @@ void Intro::update() {
|
||||
tiled_bg_->update(); // Actualiza el fondo
|
||||
|
||||
switch (state_) {
|
||||
case IntroState::SCENES:
|
||||
case State::SCENES:
|
||||
updateSprites();
|
||||
updateTexts();
|
||||
updateScenes();
|
||||
break;
|
||||
|
||||
case IntroState::POST:
|
||||
case State::POST:
|
||||
updatePostState();
|
||||
break;
|
||||
}
|
||||
@@ -240,13 +240,13 @@ void Intro::render() {
|
||||
tiled_bg_->render(); // Dibuja el fondo
|
||||
|
||||
switch (state_) {
|
||||
case IntroState::SCENES: {
|
||||
case State::SCENES: {
|
||||
renderTextRect();
|
||||
renderSprites();
|
||||
renderTexts();
|
||||
break;
|
||||
}
|
||||
case IntroState::POST:
|
||||
case State::POST:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -479,7 +479,7 @@ void Intro::updatePostState() {
|
||||
const Uint32 ELAPSED_TIME = SDL_GetTicks() - state_start_time_;
|
||||
|
||||
switch (post_state_) {
|
||||
case IntroPostState::STOP_BG:
|
||||
case PostState::STOP_BG:
|
||||
// EVENTO: Detiene el fondo después de 1 segundo
|
||||
if (ELAPSED_TIME >= 1000) {
|
||||
tiled_bg_->stopGracefully();
|
||||
@@ -493,12 +493,12 @@ void Intro::updatePostState() {
|
||||
|
||||
// Cambia de estado si el fondo se ha detenido y recuperado el color
|
||||
if (tiled_bg_->isStopped() && bg_color_.IS_EQUAL_TO(param.title.bg_color)) {
|
||||
post_state_ = IntroPostState::END;
|
||||
post_state_ = PostState::END;
|
||||
state_start_time_ = SDL_GetTicks();
|
||||
}
|
||||
break;
|
||||
|
||||
case IntroPostState::END:
|
||||
case PostState::END:
|
||||
// Finaliza la intro después de 1 segundo
|
||||
if (ELAPSED_TIME >= 1000) {
|
||||
Audio::get()->stopMusic();
|
||||
|
||||
Reference in New Issue
Block a user