diff --git a/data/gfx/player_bal1_body.png b/data/gfx/player_bal1_body.png index 2c4246c..c9ca6c8 100644 Binary files a/data/gfx/player_bal1_body.png and b/data/gfx/player_bal1_body.png differ diff --git a/data/gfx/player_bal1_death.png b/data/gfx/player_bal1_death.png index c169ba1..0cda9ea 100644 Binary files a/data/gfx/player_bal1_death.png and b/data/gfx/player_bal1_death.png differ diff --git a/data/gfx/player_bal1_fire.png b/data/gfx/player_bal1_fire.png index 4751249..750c20b 100644 Binary files a/data/gfx/player_bal1_fire.png and b/data/gfx/player_bal1_fire.png differ diff --git a/data/gfx/player_bal1_head.png b/data/gfx/player_bal1_head.png index d35d3a0..1cd7395 100644 Binary files a/data/gfx/player_bal1_head.png and b/data/gfx/player_bal1_head.png differ diff --git a/data/gfx/player_bal1_legs.png b/data/gfx/player_bal1_legs.png index 7d86ee3..abb4619 100644 Binary files a/data/gfx/player_bal1_legs.png and b/data/gfx/player_bal1_legs.png differ diff --git a/data/gfx/player_body.ani b/data/gfx/player_body.ani index dd893e7..3ad853d 100644 --- a/data/gfx/player_body.ani +++ b/data/gfx/player_body.ani @@ -1,5 +1,5 @@ -frameWidth=24 -frameHeight=24 +frameWidth=30 +frameHeight=30 [animation] name=walk diff --git a/data/gfx/player_death.ani b/data/gfx/player_death.ani index 2567468..63a7677 100644 --- a/data/gfx/player_death.ani +++ b/data/gfx/player_death.ani @@ -1,5 +1,5 @@ -frameWidth=24 -frameHeight=24 +frameWidth=30 +frameHeight=30 [animation] name=default diff --git a/data/gfx/player_fire.ani b/data/gfx/player_fire.ani index 8552ba5..cdf07d5 100644 --- a/data/gfx/player_fire.ani +++ b/data/gfx/player_fire.ani @@ -1,5 +1,5 @@ -frameWidth=28 -frameHeight=32 +frameWidth=35 +frameHeight=40 [animation] name=default diff --git a/data/gfx/player_head.ani b/data/gfx/player_head.ani index 52fc8e0..2409022 100644 --- a/data/gfx/player_head.ani +++ b/data/gfx/player_head.ani @@ -1,5 +1,5 @@ -frameWidth=24 -frameHeight=24 +frameWidth=30 +frameHeight=30 [animation] name=walk diff --git a/data/gfx/player_legs.ani b/data/gfx/player_legs.ani index 9cd6905..1eb5c11 100644 --- a/data/gfx/player_legs.ani +++ b/data/gfx/player_legs.ani @@ -1,5 +1,5 @@ -frameWidth=24 -frameHeight=24 +frameWidth=30 +frameHeight=30 [animation] name=walk diff --git a/source/game.cpp b/source/game.cpp index cb49473..ae5a28f 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -179,10 +179,10 @@ void Game::init(int playerID) players.clear(); // Crea los dos jugadores - Player *player1 = new Player((PLAY_AREA_CENTER_FIRST_QUARTER_X * ((0 * 2) + 1)) - 11, PLAY_AREA_BOTTOM - 24, renderer, playerTextures[0], playerAnimations); + Player *player1 = new Player((PLAY_AREA_CENTER_FIRST_QUARTER_X * ((0 * 2) + 1)) - 11, PLAY_AREA_BOTTOM - 30, renderer, playerTextures[0], playerAnimations); players.push_back(player1); - Player *player2 = new Player((PLAY_AREA_CENTER_FIRST_QUARTER_X * ((1 * 2) + 1)) - 11, PLAY_AREA_BOTTOM - 24, renderer, playerTextures[1], playerAnimations); + Player *player2 = new Player((PLAY_AREA_CENTER_FIRST_QUARTER_X * ((1 * 2) + 1)) - 11, PLAY_AREA_BOTTOM - 30, renderer, playerTextures[1], playerAnimations); players.push_back(player2); // Habilita el jugador seleccionado. playerID es player 1 o player 2 diff --git a/source/game.h b/source/game.h index 41aba01..faeac79 100644 --- a/source/game.h +++ b/source/game.h @@ -240,7 +240,6 @@ private: // Guarda el fichero de datos para la demo bool saveDemoFile(); #endif - // Inicializa las formaciones enemigas void initEnemyFormations(); diff --git a/source/player.cpp b/source/player.cpp index ccbb400..eb34958 100644 --- a/source/player.cpp +++ b/source/player.cpp @@ -52,11 +52,11 @@ void Player::init() input = true; // Establece la altura y el ancho del jugador - width = 24; - height = 24; + width = 30; + height = 30; // Establece el tamaño del circulo de colisión - collider.r = 7; + collider.r = 9; // Actualiza la posición del circulo de colisión shiftColliders(); @@ -153,7 +153,7 @@ void Player::move() headSprite->setPosY(posY); fireSprite->setPosX(getPosX() - 2); - fireSprite->setPosY(posY - 8); + fireSprite->setPosY(posY - 10); } else { @@ -179,7 +179,7 @@ void Player::render() { if (invulnerable) { - if ((invulnerableCounter % 10) > 4) + if ((invulnerableCounter % 6) > 2) { if (powerUp) { @@ -528,10 +528,12 @@ void Player::removeExtraHit() { coffees--; } + if (coffees == 0) { extraHit = false; } + invulnerable = true; invulnerableCounter = PLAYER_INVULNERABLE_COUNTER; } @@ -576,27 +578,18 @@ Texture *Player::getDeadTexture() // Actualiza el valor de la variable void Player::updatePowerUpHeadOffset() { - if (!powerUp) - { - // powerUpHeadOffset = 0; - } - else - { - // powerUpHeadOffset = 96; + if (powerUp) if (powerUpCounter < 300) { - if (powerUpCounter % 10 > 4) + if (powerUpCounter % 6 > 2) { - // powerUpHeadOffset = 96; fireSprite->setEnabled(false); } else { - // powerUpHeadOffset = 0; fireSprite->setEnabled(true); } } - } } // Pone las texturas del jugador