This commit is contained in:
2024-11-22 13:57:55 +01:00
parent 1a2d2074b8
commit b273358107
4 changed files with 636 additions and 2 deletions

View File

@@ -14,9 +14,9 @@ void Plansza::spawn_meteor() {
if (spawnClock.getElapsedTime().asSeconds() > rand() % 10 + 1) { // randomowy spawn meteorytów od 10 do 1 sekundy
if (meteors.size() < 5) { // jeśli jest mniej niż 5 meteorów na planszy
if(rand() % 2 == 1) {
meteors.emplace_back(RandomNumberGenerator::getRandomNumber(0,499), -100, meteorTexture2);
meteors.emplace_back(RandomNumberGenerator::getRandomNumber(50,499), -100, meteorTexture2);
} else {
meteors.emplace_back(RandomNumberGenerator::getRandomNumber(0,499), -100, meteorTexture1);
meteors.emplace_back(RandomNumberGenerator::getRandomNumber(50,499), -100, meteorTexture1);
}
}
spawnClock.restart();