18 lines
451 B
C++
18 lines
451 B
C++
#include "../headers/EnemyBullet.h"
|
|
|
|
EnemyBullet::EnemyBullet(float x, float y, sf::Texture &texture)
|
|
: Projectile(x, y, texture) {
|
|
speed = 5.0f; // Ruch w dół (dodatnia prędkość)
|
|
}
|
|
|
|
void EnemyBullet::update() {
|
|
sprite.move(0.0f, speed); // Przesuwanie pocisku w dół
|
|
position.y += speed;
|
|
|
|
if (position.y > 800) {
|
|
outOfBounds = true;
|
|
}
|
|
}
|
|
void EnemyBullet::setOutOfBounds(bool status) {
|
|
outOfBounds = status;
|
|
} |