cleanup time-based: elimina entitats frame-based (Bullet/Item/Player/Balloon), VELX en px/s, Game::popBalloon amb vel en px/s
This commit is contained in:
@@ -1676,7 +1676,7 @@ void Game::popBalloon(Balloon *balloon) {
|
||||
const int INDEX = createBalloon(0, balloon->getPosY(), balloon->getKind() - 1, Balloon::VELX_NEGATIVE, enemy_speed_, 0);
|
||||
balloons_[INDEX]->allignTo(balloon->getPosX() + (balloon->getWidth() / 2));
|
||||
if (balloons_[INDEX]->getClass() == Balloon::BALLOON_CLASS) {
|
||||
balloons_[INDEX]->setVelY(-2.50F);
|
||||
balloons_[INDEX]->setVelY(-150.0F); // -2.5 px/frame ⇒ -150 px/s
|
||||
} else {
|
||||
balloons_[INDEX]->setVelY(Balloon::VELX_NEGATIVE);
|
||||
}
|
||||
@@ -1684,7 +1684,7 @@ void Game::popBalloon(Balloon *balloon) {
|
||||
const int INDEX2 = createBalloon(0, balloon->getPosY(), balloon->getKind() - 1, Balloon::VELX_POSITIVE, enemy_speed_, 0);
|
||||
balloons_[INDEX2]->allignTo(balloon->getPosX() + (balloon->getWidth() / 2));
|
||||
if (balloons_[INDEX2]->getClass() == Balloon::BALLOON_CLASS) {
|
||||
balloons_[INDEX2]->setVelY(-2.50F);
|
||||
balloons_[INDEX2]->setVelY(-150.0F);
|
||||
} else {
|
||||
balloons_[INDEX2]->setVelY(Balloon::VELX_NEGATIVE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user