I have the overlay display the low health blood using the gui system.
This commit is contained in:
parent
70a9420c11
commit
d8e1fc7aa3
5 changed files with 50 additions and 24 deletions
|
@ -9,19 +9,13 @@ namespace gui {
|
|||
public:
|
||||
guecs::UI $gui;
|
||||
GameLevel $level;
|
||||
std::unordered_map<std::string, DinkyECS::Entity> $name_ents;
|
||||
TexturePack& $textures;
|
||||
|
||||
OverlayUI(GameLevel level);
|
||||
OverlayUI(GameLevel level, TexturePack& $textures);
|
||||
|
||||
void render(TexturePack& texture);
|
||||
void render();
|
||||
void draw(sf::RenderWindow& window);
|
||||
void click(int x, int y);
|
||||
|
||||
template <typename Comp>
|
||||
// this should be in the GUECS really
|
||||
void set(std::string name, Comp val) {
|
||||
auto ent = $name_ents.at(name);
|
||||
$level.world->set<Comp>(ent, val);
|
||||
}
|
||||
void show_damage(bool show);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue