Restrukt classes WIP

This commit is contained in:
2024-11-26 16:05:57 +01:00
parent 6996490f3c
commit 559d946cab
6 changed files with 19 additions and 13 deletions
+5 -4
View File
@@ -5,11 +5,12 @@
#include "SFML/Graphics/Texture.hpp"
#include "Bullet.h"
struct Position {
int x;
int y;
};
class Actor {
struct Position {
int x;
int y;
};
public:
Actor(int x, int y, std::string path);
+2 -2
View File
@@ -11,14 +11,14 @@ class Bullet {
};
public:
Bullet(float x, float y, sf::Texture &texture);
Bullet(float x, float y);
sf::Sprite &getSprite();
void setSpeed(float speed);
bool getStatus() const;
void update();
static sf::Texture bulletTexture;
private:
sf::Sprite bulletSprite;
sf::Texture bulletTexture;
Position bulletPosition;
float bulletSpeed;
bool outOfBounds;