corregit: bug en Audio::fadeOutMusic quan la musica no es reproduia en bucle
This commit is contained in:
@@ -49,13 +49,13 @@ Credits::Credits()
|
||||
|
||||
fade_in_->setColor(param.fade.color);
|
||||
fade_in_->setType(Fade::Type::FULLSCREEN);
|
||||
fade_in_->setPostDuration(static_cast<int>(50 * (1000.0f / 60.0f))); // 50 frames = ~833ms
|
||||
fade_in_->setPostDuration(800);
|
||||
fade_in_->setMode(Fade::Mode::IN);
|
||||
fade_in_->activate();
|
||||
|
||||
fade_out_->setColor(0, 0, 0);
|
||||
fade_out_->setType(Fade::Type::FULLSCREEN);
|
||||
fade_out_->setPostDuration(static_cast<int>(400 * (1000.0f / 60.0f))); // 400 frames = ~6667ms
|
||||
fade_out_->setPostDuration(7000);
|
||||
|
||||
updateRedRect();
|
||||
tiled_bg_->setColor(Color(255, 96, 96));
|
||||
@@ -487,12 +487,12 @@ void Credits::updateAllFades(float deltaTime) {
|
||||
updateRedRect();
|
||||
}
|
||||
|
||||
fade_in_->update(); // Fade ya usa tiempo interno
|
||||
if (fade_in_->hasEnded()) {
|
||||
fade_in_->update();
|
||||
if (fade_in_->hasEnded() && Audio::get()->getMusicState() != Audio::MusicState::PLAYING) {
|
||||
Audio::get()->playMusic("credits.ogg");
|
||||
}
|
||||
|
||||
fade_out_->update(); // Fade ya usa tiempo interno
|
||||
fade_out_->update();
|
||||
if (fade_out_->hasEnded()) {
|
||||
Section::name = Section::Name::HI_SCORE_TABLE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user