A vore si el helper ja funciona com toca
This commit is contained in:
@@ -77,12 +77,6 @@ Game::Game(int player_id, int current_stage, bool demo, JA_Music_t *music)
|
|||||||
|
|
||||||
background_->setPos(param.game.play_area.rect);
|
background_->setPos(param.game.play_area.rect);
|
||||||
|
|
||||||
// game_text_sprites_.emplace_back(std::make_shared<SmartSprite>(game_text_textures_.at(0)));
|
|
||||||
// game_text_sprites_.emplace_back(std::make_shared<SmartSprite>(game_text_textures_.at(1)));
|
|
||||||
// game_text_sprites_.emplace_back(std::make_shared<SmartSprite>(game_text_textures_.at(2)));
|
|
||||||
// game_text_sprites_.emplace_back(std::make_shared<SmartSprite>(game_text_textures_.at(3)));
|
|
||||||
// game_text_sprites_.emplace_back(std::make_shared<SmartSprite>(game_text_textures_.at(4)));
|
|
||||||
|
|
||||||
explosions_->addTexture(1, explosions_textures_[0], explosions_animations_[0]);
|
explosions_->addTexture(1, explosions_textures_[0], explosions_animations_[0]);
|
||||||
explosions_->addTexture(2, explosions_textures_[1], explosions_animations_[1]);
|
explosions_->addTexture(2, explosions_textures_[1], explosions_animations_[1]);
|
||||||
explosions_->addTexture(3, explosions_textures_[2], explosions_animations_[2]);
|
explosions_->addTexture(3, explosions_textures_[2], explosions_animations_[2]);
|
||||||
@@ -2280,10 +2274,15 @@ void Game::updateHelper()
|
|||||||
// Solo ofrece ayuda cuando la amenaza es elevada
|
// Solo ofrece ayuda cuando la amenaza es elevada
|
||||||
if (menace_current_ > 15)
|
if (menace_current_ > 15)
|
||||||
{
|
{
|
||||||
|
helper_.need_coffee = true;
|
||||||
|
helper_.need_coffee_machine = true;
|
||||||
for (const auto &player : players_)
|
for (const auto &player : players_)
|
||||||
{
|
{
|
||||||
helper_.need_coffee = (player->getCoffees() == 0);
|
if (player->isPlaying())
|
||||||
helper_.need_coffee_machine = (!player->isPowerUp());
|
{
|
||||||
|
helper_.need_coffee &= (player->getCoffees() == 0);
|
||||||
|
helper_.need_coffee_machine &= (!player->isPowerUp());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user