finalitzada la classe Explosions
This commit is contained in:
@@ -162,6 +162,13 @@ void MovingSprite::setRect(SDL_Rect rect)
|
||||
h = rect.h;
|
||||
}
|
||||
|
||||
// Establece el valor de las variables
|
||||
void MovingSprite::setPos(float x, float y)
|
||||
{
|
||||
this->x = x;
|
||||
this->y = y;
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
void MovingSprite::setPosX(float value)
|
||||
{
|
||||
|
||||
@@ -85,6 +85,9 @@ public:
|
||||
// Establece la posición y el tamaño del objeto
|
||||
void setRect(SDL_Rect rect);
|
||||
|
||||
// Establece el valor de las variables
|
||||
void setPos(float x, float y);
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setPosX(float value);
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ void Explosions::add(int x, int y, int size)
|
||||
{
|
||||
const int index = getIndexBySize(size);
|
||||
AnimatedSprite *sprite = new AnimatedSprite(textures[index].texture, "", textures[index].animation);
|
||||
sprite->setPos({x, y});
|
||||
sprite->setPos(x, y);
|
||||
explosions.push_back(sprite);
|
||||
}
|
||||
|
||||
|
||||
@@ -364,13 +364,13 @@ void Game::loadMedia()
|
||||
Texture *explosion1Texture = new Texture(renderer, asset->get("balloon1_explosion.png"));
|
||||
explosionsTextures.push_back(explosion1Texture);
|
||||
|
||||
Texture *explosion2Texture = new Texture(renderer, asset->get("balloon1_explosion.png"));
|
||||
Texture *explosion2Texture = new Texture(renderer, asset->get("balloon2_explosion.png"));
|
||||
explosionsTextures.push_back(explosion2Texture);
|
||||
|
||||
Texture *explosion3Texture = new Texture(renderer, asset->get("balloon1_explosion.png"));
|
||||
Texture *explosion3Texture = new Texture(renderer, asset->get("balloon3_explosion.png"));
|
||||
explosionsTextures.push_back(explosion3Texture);
|
||||
|
||||
Texture *explosion4Texture = new Texture(renderer, asset->get("balloon1_explosion.png"));
|
||||
Texture *explosion4Texture = new Texture(renderer, asset->get("balloon4_explosion.png"));
|
||||
explosionsTextures.push_back(explosion4Texture);
|
||||
|
||||
// Texturas - Items
|
||||
|
||||
Reference in New Issue
Block a user