Au, a dormir que tinc son
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "balloon_manager.h"
|
||||
#include "stage.h"
|
||||
#include <numeric> // Para accumulate
|
||||
#include <algorithm> // Para find_if, clamp, min, remove_if
|
||||
#include "balloon.h" // Para Balloon, BALLOON_SCORE, BALLOON_VE...
|
||||
@@ -12,7 +13,7 @@
|
||||
// Constructor
|
||||
BalloonManager::BalloonManager()
|
||||
: explosions_(std::make_unique<Explosions>()),
|
||||
balloon_formations_(std::make_unique<BalloonFormations>()) {init();}
|
||||
balloon_formations_(std::make_unique<BalloonFormations>()) { init(); }
|
||||
|
||||
// Inicializa
|
||||
void BalloonManager::init()
|
||||
@@ -328,4 +329,25 @@ void BalloonManager::normalColorsToAllBalloons()
|
||||
{
|
||||
balloon->useNormalColor();
|
||||
}
|
||||
}
|
||||
|
||||
// Recarga las texturas
|
||||
void BalloonManager::reLoad()
|
||||
{
|
||||
for (auto &texture : balloon_textures_)
|
||||
{
|
||||
texture->reLoad();
|
||||
}
|
||||
}
|
||||
|
||||
// Crea dos globos gordos
|
||||
void BalloonManager::createTwoBigBalloons()
|
||||
{
|
||||
const auto set = balloon_formations_->getSet(0, 1);
|
||||
const auto numEnemies = set.number_of_balloons;
|
||||
for (int i = 0; i < numEnemies; ++i)
|
||||
{
|
||||
auto p = set.init[i];
|
||||
createBalloon(p.x, p.y, p.type, p.size, p.vel_x, balloon_speed_, p.creation_counter);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user