diff options
Diffstat (limited to 'player.lua')
-rw-r--r-- | player.lua | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -271,8 +271,13 @@ function Player:draw (offset_x, offset_y, scale, debug) end -- Draw HUD of `Player` -function Player:drawHUD (x,y,scale) +-- elevation: 1 bottom, 0 top +function Player:drawHUD (x,y,scale,elevation) + love.graphics.setColor(255,255,255,255) love.graphics.draw(self.portrait_sprite, self.portrait_sheet[self.name].normal, x*scale, y*scale, 0, scale, scale) + local dy = 30 * elevation + love.graphics.print(self.combo.."0x",(x+2)*scale,(y-3+dy)*scale,0,scale,scale) + love.graphics.print(math.max(0, self.lives),(x+24)*scale,(y-3+dy)*scale,0,scale,scale) end -- Change animation of `Player` |