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/headers/Bullet.h

29 lines
551 B
C++

#ifndef LOTOSTATEK_BULLET_H
#define LOTOSTATEK_BULLET_H
#include "SFML/Graphics/Sprite.hpp"
#include "SFML/Graphics/Texture.hpp"
class Bullet {
struct Position {
int x;
int y;
};
public:
Bullet(float x, float y, sf::Texture &texture);
void update();
sf::Sprite& getSprite();
void setSpeed(float speed);
bool getStatus() const;
private:
sf::Sprite bulletSprite;
sf::Texture bulletTexture;
float bulletSpeed;
Position bulletPosition;
bool outOfBounds;
};
#endif //LOTOSTATEK_BULLET_H