2019-03-10 13:11:26 +01:00
|
|
|
local BattleHUD = Object:extend()
|
|
|
|
|
2019-03-10 13:56:49 +01:00
|
|
|
local gui = require "game.modules.gui"
|
|
|
|
|
2019-03-10 13:11:26 +01:00
|
|
|
function BattleHUD:new(controller)
|
|
|
|
self.controller = controller
|
|
|
|
|
|
|
|
self:loadAssets()
|
|
|
|
end
|
|
|
|
|
|
|
|
function BattleHUD:loadAssets()
|
2019-08-13 21:08:37 +02:00
|
|
|
self.frame = gui.newBorder(424, 30, 8)
|
2019-03-10 13:11:26 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
function BattleHUD:destroy( )
|
2019-08-13 21:08:37 +02:00
|
|
|
self.frame:release( )
|
2019-03-10 13:11:26 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
function BattleHUD:update(dt)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
function BattleHUD:draw()
|
2019-08-13 21:08:37 +02:00
|
|
|
self.controller.assets.fonts["hudnbrs"]:set()
|
2019-03-10 13:11:26 +01:00
|
|
|
self:drawFrame()
|
|
|
|
--self.controller:resetFont( )
|
|
|
|
end
|
|
|
|
|
|
|
|
function BattleHUD:drawFrame()
|
2019-08-13 21:08:37 +02:00
|
|
|
love.graphics.draw(self.frame, 424, 20, 0, -1, -1)
|
|
|
|
self.controller.assets.images["statusbar"]:draw(-8, 215)
|
|
|
|
self.controller.assets.images["statusbar"]:draw(-8 + 128 + 24, 215)
|
|
|
|
self.controller.assets.images["statusbar"]:draw(-8 + 256 + 48, 215)
|
2019-03-10 13:11:26 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
return BattleHUD
|