small update

This commit is contained in:
Joseph Aquino 2025-09-24 19:02:16 -04:00
parent e50b5d6940
commit 76ef3cdd0b
1 changed files with 6 additions and 4 deletions

View File

@ -445,10 +445,7 @@ void Game::checkEndGame()
if (player.lives <= 0)
{
player.lives = 3;
player.score = 0;
resetGame();
ballsToAdd.emplace_back(sf::Vector2f{player.pos.x, player.pos.y - 50});
}
}
@ -529,7 +526,7 @@ void Game::render()
lives.setString("Lives: " + std::to_string(player.lives));
score.setString("Score: " + std::to_string(player.score));
currentMult.setString("Mult: x" + std::to_string(balls.size()));
window.draw(lives);
window.draw(score);
window.draw(currentMult);
@ -629,6 +626,11 @@ void Game::resetGame()
ballsToAdd.clear();
setupLevel();
player.lives = 3;
player.score = 0;
ballsToAdd.emplace_back(sf::Vector2f{player.pos.x, player.pos.y - 50});
}
void Game::run()