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/Projectile.h
Andrii Solianyk 72e2116dc7 Refactor of structs
Refactored Size and Position
Placed them in different .h files
2024-12-04 14:47:50 +01:00

24 lines
492 B
C++

#ifndef PROJECTILE_H
#define PROJECTILE_H
#include <SFML/Graphics/Sprite.hpp>
#include "Position.h"
class Projectile {
public:
Projectile(float x, float y, sf::Texture &texture);
sf::Sprite &getSprite();
void setSpeed(float speed);
bool isOutOfBounds() const;
virtual void update() = 0;
protected:
static sf::Texture texture;
sf::Sprite sprite;
Position position;
float speed;
bool outOfBounds;
~Projectile() = default;
};
#endif //PROJECTILE_H