Resuelto un bug en la colision de balas con globos

This commit is contained in:
2022-10-04 14:16:22 +02:00
parent c3fd348a61
commit 9f93de1d06
5 changed files with 22 additions and 7 deletions

View File

@@ -1877,7 +1877,7 @@ void Game::popBalloon(Balloon *balloon)
{
balloons.at(index)->setVelY(-2.50f);
}
else if (balloons.at(index)->getClass() == HEXAGON_CLASS)
else
{
balloons.at(index)->setVelY(BALLOON_VELX_NEGATIVE);
}
@@ -1888,7 +1888,7 @@ void Game::popBalloon(Balloon *balloon)
{
balloons.at(index2)->setVelY(-2.50f);
}
else if (balloons.at(index2)->getClass() == HEXAGON_CLASS)
else
{
balloons.at(index2)->setVelY(BALLOON_VELX_NEGATIVE);
}
@@ -2472,7 +2472,7 @@ void Game::updateShakeEffect()
// Crea un SmartSprite para arrojar el item café al recibir un impacto
void Game::throwCoffee(int x, int y)
{
SmartSprite *ss = new SmartSprite(nullptr, mRenderer);
SmartSprite *ss = new SmartSprite(mTextureItems, mRenderer);
smartSprites.push_back(ss);
ss->setPosX(x - 8);