Cos usprawnione i nasrane

This commit is contained in:
2024-12-11 16:51:56 +01:00
parent 2234e4d973
commit 41945b3d88
7 changed files with 56 additions and 7 deletions

View File

@@ -1,9 +1,13 @@
#include "../headers/Bullet.h"
#include <iostream>
#include <ostream>
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;
}
}
}