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

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);