BossFightUI is not managed by the level manager since it is kind of a new level, just with a different mini game.
This commit is contained in:
parent
a3f6ba3c03
commit
ca18422930
12 changed files with 49 additions and 67 deletions
|
@ -1,5 +1,4 @@
|
|||
#pragma once
|
||||
#include "levelmanager.hpp"
|
||||
#include <SFML/Graphics/RenderWindow.hpp>
|
||||
#include <SFML/Graphics/Font.hpp>
|
||||
#include "guecs.hpp"
|
||||
|
@ -14,20 +13,17 @@
|
|||
// 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};
|
||||
std::string $weapon_hit_sound;
|
||||
components::Combat $combat;
|
||||
components::Sprite $sprite_config;
|
||||
components::Sound $sounds;
|
||||
components::Animation $animation;
|
||||
GameLevel $level;
|
||||
components::GameConfig& $config;
|
||||
std::string $boss_name;
|
||||
guecs::UI $status;
|
||||
|
@ -35,14 +31,13 @@ namespace gui {
|
|||
textures::SpriteTexture $boss_image;
|
||||
textures::SpriteTexture $boss_background;
|
||||
|
||||
BossFightUI(GameLevel level, std::string boss_name);
|
||||
BossFightUI(DinkyECS::World& world, std::string boss_name);
|
||||
|
||||
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);
|
||||
bool boss_dead() { return $combat.hp < 0; }
|
||||
void configure_sprite();
|
||||
void configure_background();
|
||||
void configure_gui();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue