This repository has been archived on 2025-06-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
LotoStatek/sources/Bullet.cpp
Andrii Solianyk 67f396ae84 Zaimplementowano debuff.
Do dokończenia resetowanie debuff
2025-01-13 15:55:45 +01:00

17 lines
492 B
C++

#include "../headers/Bullet.h"
Bullet::Bullet(float x, float y, sf::Texture &texture): Projectile(x,y, texture) {}
Bullet::Bullet(float x, float y, sf::Texture &texture, float speed): Projectile(x,y, texture) {
this->speed = -speed;
}
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;
}
}