oh stupid meeeeeeeee
This commit is contained in:
parent
00405645f7
commit
3cdeac3988
|
@ -27,7 +27,7 @@ local function entityBox(ent)
|
|||
_hp_txt = hp_txt,
|
||||
update = function(self, entity)
|
||||
self._cube.setPosition(entity.x - 0.25, entity.y - 0.25, entity.z - 0.25)
|
||||
self._hpbar.setPosition(entity, entity.y + 0.5, entity.z)
|
||||
self._hpbar.setPosition(entity.x, entity.y + 0.5, entity.z)
|
||||
self._hp_rect_fg.setSize(2 * entity.health / entity.maxHealth, 0.25)
|
||||
self._hp_txt.setText(string.format("%s (%.1f/%.1f)", entity.name, entity.health, entity.maxHealth))
|
||||
end,
|
||||
|
|
Loading…
Reference in New Issue