New Projectiles class

Refactor of Bullet class
Different method of shooting.
This commit is contained in:
2024-12-01 17:44:25 +01:00
parent 2f6c98f4be
commit 2341c2fa6d
11 changed files with 127 additions and 62 deletions

View File

@@ -30,7 +30,7 @@ std::vector<Bullet> &Actor::getBullets() {
void Actor::updateBullets() {
for (auto& bullet : bullets) {
if(bullet.getStatus()) {
if(bullet.isOutOfBounds()) {
bullets.erase(bullets.begin());
}
}