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

9
sources/Rocket.cpp Normal file
View File

@@ -0,0 +1,9 @@
#include "../headers/Rocket.h"
void Rocket::update() {
sprite.move(0.0f, speed);
position.y += int(speed);
if(position.y < -100) {
outOfBounds = true;
}
}