Compare commits
3 Commits
b044fe1702
...
8fda06e232
| Author | SHA1 | Date | |
|---|---|---|---|
| 8fda06e232 | |||
| fb2ffd58ee | |||
| 3f183a5489 |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -11,4 +11,8 @@ thumbs.db
|
||||
*.app
|
||||
*config.bin
|
||||
*score.bin
|
||||
coffee_crisis*
|
||||
coffee_crisis*
|
||||
SDL2.dll
|
||||
libwinpthread-1.dll
|
||||
libstdc++-6.dll
|
||||
libgcc_s_seh-1.dll
|
||||
|
||||
@@ -2552,7 +2552,7 @@ Uint8 Game::dropItem()
|
||||
// Crea un objeto item
|
||||
void Game::createItem(Uint8 kind, float x, float y)
|
||||
{
|
||||
Item *item = new Item(kind, x, y, itemTextures[kind], itemAnimations[kind], renderer);
|
||||
Item *item = new Item(kind, x, y, itemTextures[kind - 1], itemAnimations[kind - 1], renderer);
|
||||
items.push_back(item);
|
||||
}
|
||||
|
||||
@@ -3066,7 +3066,7 @@ void Game::checkGameInput()
|
||||
if (players[index]->canFire())
|
||||
{
|
||||
players[index]->setInput(input_fire_left);
|
||||
createBullet(players[index]->getPosX() + (players[index]->getWidth() / 2) - 4, players[index]->getPosY() + (players[index]->getHeight() / 2), BULLET_UP, players[index]->isPowerUp(), index);
|
||||
createBullet(players[index]->getPosX() + (players[index]->getWidth() / 2) - 4, players[index]->getPosY() + (players[index]->getHeight() / 2), BULLET_LEFT, players[index]->isPowerUp(), index);
|
||||
players[index]->setFireCooldown(10);
|
||||
}
|
||||
}
|
||||
@@ -3076,7 +3076,7 @@ void Game::checkGameInput()
|
||||
if (players[index]->canFire())
|
||||
{
|
||||
players[index]->setInput(input_fire_right);
|
||||
createBullet(players[index]->getPosX() + (players[index]->getWidth() / 2) - 4, players[index]->getPosY() + (players[index]->getHeight() / 2), BULLET_UP, players[index]->isPowerUp(), index);
|
||||
createBullet(players[index]->getPosX() + (players[index]->getWidth() / 2) - 4, players[index]->getPosY() + (players[index]->getHeight() / 2), BULLET_RIGHT, players[index]->isPowerUp(), index);
|
||||
players[index]->setFireCooldown(10);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
#define ITEM_H
|
||||
|
||||
// Tipos de objetos
|
||||
#define ITEM_POINTS_1_DISK 0
|
||||
#define ITEM_POINTS_2_GAVINA 1
|
||||
#define ITEM_POINTS_3_PACMAR 2
|
||||
#define ITEM_CLOCK 3
|
||||
#define ITEM_COFFEE 4
|
||||
#define ITEM_COFFEE_MACHINE 5
|
||||
#define ITEM_POINTS_1_DISK 1
|
||||
#define ITEM_POINTS_2_GAVINA 2
|
||||
#define ITEM_POINTS_3_PACMAR 3
|
||||
#define ITEM_CLOCK 4
|
||||
#define ITEM_COFFEE 5
|
||||
#define ITEM_COFFEE_MACHINE 6
|
||||
|
||||
// Clase Item
|
||||
class Item
|
||||
|
||||
Reference in New Issue
Block a user