feat: add new HUD elements

This commit is contained in:
Kazhnuz 2019-07-27 16:32:48 +02:00
parent cc5fddb45b
commit f636d0c6d3
4 changed files with 4 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 7 KiB

View file

@ -10,6 +10,8 @@ function Player:new(world, x, y, z, id)
self:cloneSprite()
self.guiborder = game.gui.newBorder(424, 20, 6)
self.emblem = love.graphics.newImage("assets/gui/emblem_speedster.png")
self.status = love.graphics.newImage("assets/gui/status_bar.png")
end
function Player:updateStart(dt)
@ -75,8 +77,9 @@ function Player:draw()
end
function Player:drawHUD(id)
love.graphics.print(id .. " test", 4, 4)
love.graphics.draw(self.guiborder, 424, 20, 0, -1, -1)
love.graphics.draw(self.emblem, 8, 8, 0)
love.graphics.draw(self.status, 24, 16, 0)
end
return Player