fix serduszek

This commit is contained in:
2024-12-14 20:47:02 +01:00
parent 5459b97e74
commit 15a8d82176

View File

@@ -720,7 +720,7 @@ void Plansza::spawn_meteor() {
}
void Plansza::spawn_hearts() {
if (heartSpawnClock.getElapsedTime().asSeconds() > float(RandomNumberGenerator::getRandomNumber(5,30))) { // randomowy spawn meteorytów od 5 do 30 sekundy
if (heartSpawnClock.getElapsedTime().asSeconds() > rand() % 26 + 5) { // randomowy spawn meteorytów od 5 do 30 sekundy
if (hearts.size() < 5) { // jeśli jest mniej niż 5 meteorów na planszy
hearts.emplace_back(RandomNumberGenerator::getRandomNumber(50, 499), -100, heartTexture);
}