Bomber i wiazkowiec nie wylaza poza ekran

This commit is contained in:
2024-12-12 00:11:24 +01:00
parent 168ba2e477
commit f1dc19e795
6 changed files with 77 additions and 38 deletions

View File

@@ -31,8 +31,11 @@ public:
bool isAlive() const;
void takeDamage();
void updateDirection();
void setPlanszaHeight(float height, float width);
private:
float planszaHeight = 800.f;
float planszaWidth = 600.f;
sf::Clock shootClock;
sf::Texture BombaTexture;
float movementSpeed = 2.0f;

View File

@@ -32,12 +32,13 @@ public:
void updateDirection();
bool isShooting() const;
const Beam& getBeam() const;
void setPlanszaHeight(float height);
void setPlanszaHeight(float height, float width);
void setMapBounds(float width, float height);
private:
float planszaHeight = 800.f;
float planszaWidth = 600.f;
sf::Clock shootClock;
sf::Texture WiazkaTexture;
float movementSpeed = 2.0f;