feat: add new HUD elements
This commit is contained in:
parent
cc5fddb45b
commit
f636d0c6d3
4 changed files with 4 additions and 1 deletions
BIN
sonic-radiance.love/assets/gui/emblem_speedster.png
Normal file
BIN
sonic-radiance.love/assets/gui/emblem_speedster.png
Normal file
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 |
Binary file not shown.
|
@ -10,6 +10,8 @@ function Player:new(world, x, y, z, id)
|
||||||
self:cloneSprite()
|
self:cloneSprite()
|
||||||
|
|
||||||
self.guiborder = game.gui.newBorder(424, 20, 6)
|
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
|
end
|
||||||
|
|
||||||
function Player:updateStart(dt)
|
function Player:updateStart(dt)
|
||||||
|
@ -75,8 +77,9 @@ function Player:draw()
|
||||||
end
|
end
|
||||||
|
|
||||||
function Player:drawHUD(id)
|
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.guiborder, 424, 20, 0, -1, -1)
|
||||||
|
love.graphics.draw(self.emblem, 8, 8, 0)
|
||||||
|
love.graphics.draw(self.status, 24, 16, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
return Player
|
return Player
|
||||||
|
|
Loading…
Reference in a new issue