Naprawiono laser, przerobiono na wskaźniki. Do refactoringu i poprawy sprite'a
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user