11 lines
282 B
C++
11 lines
282 B
C++
#include "../headers/Bullet.h"
|
|
|
|
void Bullet::update() {
|
|
//std::cout << "Start update: speed = " << speed << ", position.y = " << position.y << std::endl;
|
|
sprite.move(0.0f, speed);
|
|
position.y += int(speed);
|
|
if(position.y < -100) {
|
|
outOfBounds = true;
|
|
}
|
|
}
|