battlesystem: initial draft of a statusbar system

This commit is contained in:
Kazhnuz 2019-04-01 08:55:59 +02:00
parent d7136cdb6a
commit 641e344663

View file

@ -138,4 +138,16 @@ function Character:getBackSignal()
self:setAnimation("walk") self:setAnimation("walk")
end end
function Character:drawStatus(frame, x, y)
love.graphics.draw(frame, x, y)
local y1 = y + 8
local x1 = x + 16
local x2 = x1 + 120
love.graphics.setColor(.05, .8, .05, 1)
for i=0, 3 do
love.graphics.line(x1-i, y1+i, x2-i, y1+i)
end
utils.graphics.resetColor()
end
return Character return Character