añadido a param.txt los parametros de los globos para velocidad y gravedad

This commit is contained in:
2024-08-03 07:56:26 +02:00
parent 8390dfd8be
commit 9ad6001046
6 changed files with 94 additions and 18 deletions

View File

@@ -1071,7 +1071,7 @@ void Game::renderBalloons()
int Game::createBalloon(float x, int y, int kind, float velx, float speed, int creationtimer)
{
const int index = (kind - 1) % 4;
Balloon *b = new Balloon(x, y, kind, velx, speed, creationtimer, balloonTextures[index], balloonAnimations[index], renderer);
Balloon *b = new Balloon(x, y, kind, velx, speed, creationtimer, balloonTextures[index], balloonAnimations[index], param);
balloons.push_back(b);
return (int)(balloons.size() - 1);
}
@@ -1089,7 +1089,7 @@ void Game::createPowerBall()
const int x[3] = {left, center, right};
const float vx[3] = {BALLOON_VELX_POSITIVE, BALLOON_VELX_POSITIVE, BALLOON_VELX_NEGATIVE};
Balloon *b = new Balloon(x[luck], posY, POWER_BALL, vx[luck], enemySpeed, 100, balloonTextures[4], balloonAnimations[4], renderer);
Balloon *b = new Balloon(x[luck], posY, POWER_BALL, vx[luck], enemySpeed, 100, balloonTextures[4], balloonAnimations[4], param);
balloons.push_back(b);
powerBallEnabled = true;