Naprawiono laser, przerobiono na wskaźniki. Do refactoringu i poprawy sprite'a

This commit is contained in:
2024-12-19 15:14:14 +01:00
parent 15a8d82176
commit 36984b859f
5 changed files with 25 additions and 25 deletions

View File

@@ -6,7 +6,7 @@
class Beam {
public:
Beam(float x, float y, float width, float height, const sf::Color& color);
Beam(float x, float y, float width, float height);
void draw(sf::RenderWindow &window);

View File

@@ -31,7 +31,7 @@ public:
void takeDamage();
void updateDirection();
bool isShooting() const;
const Beam& getBeam() const;
const Beam* getBeam() const;
void setPlanszaHeight(float height, float width);
void setMapBounds(float width, float height);
@@ -44,7 +44,7 @@ private:
float movementSpeed = 2.0f;
bool alive = true;
DirectionW direction = DirectionW::Down;
Beam beam; // Wiązka
Beam *beam; // Wiązka
bool shooting = false;
sf::Clock shootingClock;
float beamDuration = 1.0f;