#pragma once #include "levelmanager.hpp" #include #include #include "guecs.hpp" #include "textures.hpp" #include // aspect ratio of art is 3/2 so 1.5 // possible sizes: 900/600; 1620/1080; 1800/1200 // To calculate it do short side * 1.5 so 1080 * 1.5 == 1620 // // Side panel = 300/1080 namespace gui { using namespace guecs; using std::string; class BossFightUI { public: sf::Clock $clock; int $boss_hp = 10; bool $boss_hit = false; sf::Vector2f $scale{0.8, 0.8}; components::Sound $sounds; components::Animation $animation; GameLevel $level; guecs::UI $status; guecs::UI $overlay; textures::SpriteTexture $boss_image; textures::SpriteTexture $boss_background; BossFightUI(GameLevel level); void init(); void render(sf::RenderWindow& window); bool mouse(float x, float y); void bounce_boss(sf::RenderWindow& window); bool boss_dead() { return $boss_hp < 0; } void update_level(GameLevel& level); }; }