Renombradas las variablesde balloon.cpp

This commit is contained in:
2022-10-04 18:27:49 +02:00
parent adad58ccfa
commit d5ab7cbe2a
4 changed files with 347 additions and 353 deletions

View File

@@ -104,7 +104,7 @@ Uint8 Bullet::move()
posX += velX;
// Si el objeto se sale del area de juego por los laterales
if ((posX < PLAY_AREA_LEFT) || (posX + width > PLAY_AREA_RIGHT))
if ((posX < PLAY_AREA_LEFT - width) || (posX > PLAY_AREA_RIGHT))
{
// Se deshabilita
kind = NO_KIND;
@@ -116,8 +116,8 @@ Uint8 Bullet::move()
// Mueve el objeto a su nueva posición en vertical
posY += int(velY);
// Si el objeto se sale del area de juego por la parte superior o inferior
if ((posY < PLAY_AREA_TOP) || (posY + height > PLAY_AREA_BOTTOM))
// Si el objeto se sale del area de juego por la parte superior
if (posY < PLAY_AREA_TOP - height)
{
// Se deshabilita
kind = NO_KIND;