Bomber nie chce trzymac sie granic mapy da faq

This commit is contained in:
2024-12-11 18:06:26 +01:00
parent 17c372fad9
commit b257837d18
2 changed files with 3 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ void Bomber::setRandomDirection() {
if (position.x > 0) direction = DirectionB::Left;
break;
case 3:
if (position.x < 1200) direction = DirectionB::Right;
if (position.x < 600) direction = DirectionB::Right;
break;
}
}

View File

@@ -577,7 +577,7 @@ void Plansza::spawn_advanced_enemy() {
}
void Plansza::spawn_bomber() {
if (BomberSpawnClock.getElapsedTime().asSeconds() >= 100) { // Spawn co 10 sekund
if (BomberSpawnClock.getElapsedTime().asSeconds() >= 10) { // Spawn co 10 sekund
int spawnX = RandomNumberGenerator::getRandomNumber(50, size.width - 50);
BEnemies.emplace_back(spawnX, -50, BomberEnemyTexture, BombaTexture);
std::cout << "Spawned Bomber Enemy at X: " << spawnX << std::endl;
@@ -586,7 +586,7 @@ void Plansza::spawn_bomber() {
}
void Plansza::spawn_kamikadze() {
if (KamikadzeSpawnClock.getElapsedTime().asSeconds() >= 5) { // Spawn co 10 sekund
if (KamikadzeSpawnClock.getElapsedTime().asSeconds() >= 50) { // Spawn co 10 sekund
int spawnX = RandomNumberGenerator::getRandomNumber(50, size.width - 50);
KEnemies.emplace_back(spawnX, -50, KamikadzeTexture);
std::cout << "Spawned Kamikadze Enemy at X: " << spawnX << std::endl;