Refactored the bossfight_ui so it will work with any description of a boss fight.
This commit is contained in:
parent
43835da88f
commit
a3f6ba3c03
12 changed files with 99 additions and 69 deletions
|
@ -4,6 +4,7 @@
|
|||
#include <SFML/Graphics/Font.hpp>
|
||||
#include "guecs.hpp"
|
||||
#include "textures.hpp"
|
||||
#include "components.hpp"
|
||||
#include <SFML/System/Clock.hpp>
|
||||
|
||||
// aspect ratio of art is 3/2 so 1.5
|
||||
|
@ -22,15 +23,19 @@ namespace gui {
|
|||
int $boss_hp = 10;
|
||||
bool $boss_hit = false;
|
||||
sf::Vector2f $scale{0.8, 0.8};
|
||||
std::string $weapon_hit_sound;
|
||||
components::Sprite $sprite_config;
|
||||
components::Sound $sounds;
|
||||
components::Animation $animation;
|
||||
GameLevel $level;
|
||||
components::GameConfig& $config;
|
||||
std::string $boss_name;
|
||||
guecs::UI $status;
|
||||
guecs::UI $overlay;
|
||||
textures::SpriteTexture $boss_image;
|
||||
textures::SpriteTexture $boss_background;
|
||||
|
||||
BossFightUI(GameLevel level);
|
||||
BossFightUI(GameLevel level, std::string boss_name);
|
||||
|
||||
void init();
|
||||
void render(sf::RenderWindow& window);
|
||||
|
@ -38,5 +43,8 @@ namespace gui {
|
|||
void bounce_boss(sf::RenderWindow& window);
|
||||
bool boss_dead() { return $boss_hp < 0; }
|
||||
void update_level(GameLevel& level);
|
||||
void configure_sprite();
|
||||
void configure_background();
|
||||
void configure_gui();
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue