Stage ja carrega desde fitxer la informació de les fases
This commit is contained in:
@@ -67,7 +67,7 @@ Game::Game(Player::Id player_id, int current_stage, bool demo)
|
||||
// Otras variables
|
||||
Section::name = Section::Name::GAME;
|
||||
Section::options = Section::Options::NONE;
|
||||
stage_manager_->initialize();
|
||||
stage_manager_->initialize(Asset::get()->get("stages.txt"));
|
||||
stage_manager_->setPowerChangeCallback([this](int amount) { background_->incrementProgress(amount); });
|
||||
stage_manager_->jumpToStage(current_stage);
|
||||
|
||||
@@ -1846,24 +1846,6 @@ void Game::cleanVectors() {
|
||||
freePathSprites();
|
||||
}
|
||||
|
||||
/* // Gestiona el nivel de amenaza
|
||||
void Game::updateMenace() {
|
||||
if (state_ == State::PLAYING) {
|
||||
const auto STAGE = Stage::get(Stage::number);
|
||||
const float PERCENT = Stage::power / STAGE.power_to_complete;
|
||||
const int DIFFERENCE = STAGE.max_menace - STAGE.min_menace;
|
||||
|
||||
// Aumenta el nivel de amenaza en función de la puntuación
|
||||
menace_threshold_ = STAGE.min_menace + (DIFFERENCE * PERCENT);
|
||||
|
||||
// Si el nivel de amenza es inferior al umbral
|
||||
if (menace_current_ < menace_threshold_) {
|
||||
balloon_manager_->deployRandomFormation(Stage::number); // Crea una formación aleatoria de globos
|
||||
evaluateAndSetMenace(); // Recalcula el nivel de amenaza con el nuevo globo
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
// Gestiona el nivel de amenaza
|
||||
void Game::updateMenace() {
|
||||
if (state_ != State::PLAYING) {
|
||||
|
||||
Reference in New Issue
Block a user