Quitadas las cabezas rojas de powerup y acelerada la animación

This commit is contained in:
2022-10-09 12:01:28 +02:00
parent ca7ae7418e
commit d77757853d
7 changed files with 61 additions and 40 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -84,3 +84,45 @@ speed=5
loop=0
frames=44,45,46,47
[/animation]
[animation]
name=sideshoot_pwr
speed=2
loop=0
frames=24,25,26,27
[/animation]
[animation]
name=centershoot_pwr
speed=2
loop=0
frames=28,29,30,31
[/animation]
[animation]
name=sideshoot_1C_pwr
speed=2
loop=0
frames=32,33,34,35
[/animation]
[animation]
name=centershoot_1C_pwr
speed=2
loop=0
frames=36,37,38,39
[/animation]
[animation]
name=sideshoot_2C_pwr
speed=2
loop=0
frames=40,41,42,43
[/animation]
[animation]
name=centershoot_2C_pwr
speed=2
loop=0
frames=44,45,46,47
[/animation]

View File

@@ -61,54 +61,54 @@ frames=28,29,30,31
name=sideshoot
speed=5
loop=0
frames=32,33,34,35
frames=16,17,18,19
[/animation]
[animation]
name=centershoot
speed=5
loop=0
frames=36,37,38,39
frames=20,21,22,23
[/animation]
[animation]
name=sideshoot_1C
speed=5
loop=0
frames=40,41,42,43
frames=24,25,26,27
[/animation]
[animation]
name=centershoot_1C
speed=5
loop=0
frames=44,45,46,47
frames=28,29,30,31
[/animation]
[animation]
name=sideshoot_pwr
speed=5
speed=2
loop=0
frames=48,49,50,51
frames=16,17,18,19,20
[/animation]
[animation]
name=centershoot_pwr
speed=5
speed=2
loop=0
frames=52,53,54,55
frames=20,21,22,23
[/animation]
[animation]
name=sideshoot_1C_pwr
speed=5
speed=2
loop=0
frames=56,57,58,59
frames=24,25,26,27
[/animation]
[animation]
name=centershoot_1C_pwr
speed=5
speed=2
loop=0
frames=60,61,62,63
frames=28,29,30,31
[/animation]

View File

@@ -3705,28 +3705,6 @@ void Game::checkEventHandler()
reloadTextures();
break;
case SDL_SCANCODE_P:
createPowerBall();
break;
case SDL_SCANCODE_O:
stopAllBalloons(200);
break;
case SDL_SCANCODE_I:
static bool toogle = true;
if (toogle)
{
players.at(0)->setPlayerTextures(player1Textures);
toogle = !toogle;
}
else
{
players.at(0)->setPlayerTextures(player2Textures);
toogle = !toogle;
}
break;
default:
break;
}

View File

@@ -235,8 +235,8 @@ void Player::setAnimation()
aHeadCoffees = "_1C";
}
//const std::string aPowerUp = powerUp ? "_pwr" : "";
const std::string aPowerUp = "";
const std::string aPowerUp = powerUp ? "_pwr" : "";
//const std::string aPowerUp = "";
const std::string aWalking = statusWalking == PLAYER_STATUS_WALKING_STOP ? "stand" : "walk";
const std::string aFiring = statusFiring == PLAYER_STATUS_FIRING_UP ? "centershoot" : "sideshoot";
@@ -248,14 +248,14 @@ void Player::setAnimation()
legsSprite->setFlip(flipWalk);
if (statusFiring == PLAYER_STATUS_FIRING_NO)
{ // No esta disparando
bodySprite->setCurrentAnimation(aWalking + aBodyCoffees);
bodySprite->setCurrentAnimation(aWalking + aBodyCoffees + aPowerUp);
bodySprite->setFlip(flipWalk);
headSprite->setCurrentAnimation(aWalking + aHeadCoffees + aPowerUp);
headSprite->setFlip(flipWalk);
}
else
{ // Está disparando
bodySprite->setCurrentAnimation(aFiring + aBodyCoffees);
bodySprite->setCurrentAnimation(aFiring + aBodyCoffees + aPowerUp);
bodySprite->setFlip(flipFire);
headSprite->setCurrentAnimation(aFiring + aHeadCoffees + aPowerUp);
headSprite->setFlip(flipFire);

View File

@@ -26,3 +26,4 @@ x y quizas otro en la propia pantalla de game over
x que las nubes al final se vuelva a frenar
quitar las cabezas powerup
x el modo 2P no arranca
arreglar el menu de gameover cuando has completado el juego