A few tweaks to make the HP bar work constnantly, probably not the most efficient but it's good enough for now.
This commit is contained in:
parent
dfd59065f7
commit
1886c99920
5 changed files with 6 additions and 7 deletions
|
@ -319,8 +319,6 @@ namespace gui {
|
|||
|
||||
if(damage.enemy_did > 0) {
|
||||
$status_ui.log(fmt::format("Enemy HIT YOU for {} damage!", damage.enemy_did));
|
||||
auto player_combat = world.get<Combat>(player.entity);
|
||||
$combat_ui.set_damage(float(player_combat.hp) / float(player_combat.max_hp));
|
||||
} else {
|
||||
$status_ui.log("Enemy MISSED YOU.");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue