primera implementació dels estats nous del jugador: playing, continue, waiting

This commit is contained in:
2024-08-14 13:05:09 +02:00
parent 90706d5d0c
commit f8b6d0524d
6 changed files with 110 additions and 26 deletions

View File

@@ -345,6 +345,12 @@ void Player::setStatusPlaying(int value)
}
}
// Obtiene el estado del jugador en el juego
int Player::getStatusPlaying()
{
return statusPlaying;
}
// Obtiene el valor de la variable
float Player::getScoreMultiplier()
{
@@ -514,12 +520,6 @@ void Player::shiftColliders()
collider.y = int(posY + (height / 2));
}
// Obtiene el puntero a la textura con los gráficos de la animación de morir
Texture *Player::getDeadTexture()
{
return playerSprite->getTexture();
}
// Pone las texturas del jugador
void Player::setPlayerTextures(std::vector<Texture *> texture)
{
@@ -547,6 +547,23 @@ void Player::updateContinueCounter()
// Decrementa el contador
continueCounter--;
if (continueCounter < 0)
{
setStatusPlaying(PLAYER_STATUS_WAITING);
}
}
}
}
// Le asigna un panel en el marcador al jugador
void Player::setScoreBoardPanel(int panel)
{
scoreBoardPanel = panel;
}
// Obtiene el valor de la variable
int Player::getScoreBoardPanel()
{
return scoreBoardPanel;
}