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
2024-11-29 14:53:58 +01:00

30 lines
574 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::Sprite &getSprite();
void setSpeed(float speed);
bool getStatus() const;
void update();
static sf::Texture bulletTexture;
static sf::Texture rocketTexture;
private:
sf::Sprite bulletSprite;
Position bulletPosition;
float bulletSpeed;
bool outOfBounds;
};
#endif //LOTOSTATEK_BULLET_H