Add classes

This commit is contained in:
rubenwardy 2019-03-21 01:36:59 +00:00
parent bc9967907e
commit 34d891c6c5
18 changed files with 257 additions and 6 deletions

View file

@ -33,8 +33,8 @@ function hp_bar:on_step(dtime)
return
end
local hp = wielder:get_hp()
local breath = wielder:get_breath()
local hp = math.floor(20 * wielder:get_hp() / wielder:get_properties().hp_max)
local breath = math.floor(20 * wielder:get_breath() / wielder:get_properties().breath_max)
self.object:set_properties({
textures = {
"health_" .. tostring(hp) .. ".png^breath_" .. tostring(breath) .. ".png",