Afegits estats al fade
Afegida opció de prefade El modo demo ja comença a meitat del "meollo"
This commit is contained in:
@@ -68,13 +68,14 @@ Game::Game(int player_id, int current_stage, bool demo)
|
||||
scoreboard_ = Scoreboard::get();
|
||||
|
||||
fade_in_->setColor(fade_color.r, fade_color.g, fade_color.b);
|
||||
fade_in_->setPost(0);
|
||||
fade_in_->setPreDuration(demo_.enabled ? 80 : 0);
|
||||
fade_in_->setPostDuration(0);
|
||||
fade_in_->setType(FadeType::RANDOM_SQUARE);
|
||||
fade_in_->setMode(FadeMode::IN);
|
||||
fade_in_->activate();
|
||||
|
||||
fade_out_->setColor(fade_color.r, fade_color.g, fade_color.b);
|
||||
fade_out_->setPost(param.fade.post_duration);
|
||||
fade_out_->setPostDuration(param.fade.post_duration);
|
||||
fade_out_->setType(FadeType::VENETIAN);
|
||||
|
||||
background_->setPos(param.game.play_area.rect);
|
||||
@@ -1490,7 +1491,8 @@ void Game::handleFireInput(const std::shared_ptr<Player> &player, BulletType bul
|
||||
JA_PlaySound(Resource::get()->getSound("bullet.wav"));
|
||||
|
||||
// Establece un tiempo de espera para el próximo disparo.
|
||||
const int cooldown = player->isPowerUp() ? 5 : options.game.autofire ? 10 : 7;
|
||||
const int cooldown = player->isPowerUp() ? 5 : options.game.autofire ? 10
|
||||
: 7;
|
||||
player->setFireCooldown(cooldown);
|
||||
}
|
||||
}
|
||||
@@ -1678,7 +1680,7 @@ void Game::initDemo(int player_id)
|
||||
for (int i = 0; i < rand() % 3; ++i)
|
||||
player->giveExtraHit();
|
||||
|
||||
player->setInvulnerable(false);
|
||||
player->setInvulnerable(true);
|
||||
}
|
||||
|
||||
// Deshabilita los sonidos
|
||||
|
||||
Reference in New Issue
Block a user