Corregido un pase de parametros en la creación de los objetos y las balas
This commit is contained in:
@@ -1468,7 +1468,7 @@ void Game::renderBullets()
|
||||
// Crea un objeto bala
|
||||
void Game::createBullet(int x, int y, int kind, bool poweredUp, int owner)
|
||||
{
|
||||
Bullet *b = new Bullet(x, y, kind, poweredUp, owner, ¶m->game.playArea.rect, bulletTexture);
|
||||
Bullet *b = new Bullet(x, y, kind, poweredUp, owner, &(param->game.playArea.rect), bulletTexture);
|
||||
bullets.push_back(b);
|
||||
}
|
||||
|
||||
@@ -1593,7 +1593,7 @@ int Game::dropItem()
|
||||
// Crea un objeto item
|
||||
void Game::createItem(int kind, float x, float y)
|
||||
{
|
||||
Item *item = new Item(kind, x, y, ¶m->game.playArea.rect, itemTextures[kind - 1], itemAnimations[kind - 1]);
|
||||
Item *item = new Item(kind, x, y, &(param->game.playArea.rect), itemTextures[kind - 1], itemAnimations[kind - 1]);
|
||||
items.push_back(item);
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ void Item::move()
|
||||
if ((posY < PLAY_AREA_TOP) && !(kind == ITEM_COFFEE_MACHINE))
|
||||
{
|
||||
// Corrige
|
||||
posY -= velY;
|
||||
posY = PLAY_AREA_TOP;
|
||||
|
||||
// Invierte el sentido
|
||||
velY = -velY;
|
||||
@@ -121,9 +121,6 @@ void Item::move()
|
||||
// Si el objeto se sale por la parte inferior
|
||||
if (posY + height > playArea->h)
|
||||
{
|
||||
// Corrige
|
||||
posY -= velY;
|
||||
|
||||
// Detiene el objeto
|
||||
velY = 0;
|
||||
velX = 0;
|
||||
|
||||
Reference in New Issue
Block a user