From 5459b97e7433bd1a0c46cae08f17587f92da62db Mon Sep 17 00:00:00 2001 From: Andrii Solianyk Date: Sat, 14 Dec 2024 20:38:50 +0100 Subject: [PATCH] poprawniony spawn serduszek --- sources/Plansza.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/Plansza.cpp b/sources/Plansza.cpp index 8677637..55738f2 100644 --- a/sources/Plansza.cpp +++ b/sources/Plansza.cpp @@ -720,7 +720,7 @@ void Plansza::spawn_meteor() { } void Plansza::spawn_hearts() { - if (heartSpawnClock.getElapsedTime().asSeconds() > rand() % 10 + 1) { // randomowy spawn meteorytów od 10 do 1 sekundy + if (heartSpawnClock.getElapsedTime().asSeconds() > float(RandomNumberGenerator::getRandomNumber(5,30))) { // 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); }