#ifndef BOSS_H #define BOSS_H #include "Actor.h" #include "Bullet.h" #include "Beam.h" #include #include enum class BossDirection { Up, Down, Left, Right }; class Boss : public Actor { public: Boss(int x, int y, const sf::Texture &bossTexture, const sf::Texture &bulletTexture, sf::Texture BombaTexture, sf::RenderWindow *window); void setPlanszaHeight(int height, int width); void moveLeft() override; void moveRight() override; void moveUp() override; void moveDown() override; void shoot() override; void dropBomb(); void shootLaser(); void move(float deltaX, float deltaY) override; void update(); void takeDamage(); bool isAlive() const; std::vector& getBullets() { return bullets; } std::vector& getBombs() { return bombs; } bool isShooting() const { return laserBeam != nullptr; } Beam* getBeam() const { return laserBeam; } private: float movementSpeed = 5.5f; BossDirection direction = BossDirection::Down; sf::Clock shootClock; sf::Clock bombClock; sf::Clock laserClock; sf::Clock directionClock; sf::Clock beamDurationClock; float beamDuration = 1.0f; sf::Texture bulletTexture; sf::Texture BombaTexture; sf::Texture beamTexture; sf::RenderWindow* window; Beam* laserBeam = nullptr; std::vector bullets; std::vector bombs; int planszaHeight = 800; int planszaWidth = 600; bool isStationary = false; void setRandomDirection(); void handleBounds(); }; #endif // BOSS_H