sonic-radiance/sonic-radiance.love/scenes/battlesystem/controller/hud.lua

37 lines
792 B
Lua
Raw Normal View History

local BattleHUD = Object:extend()
local gui = require "game.modules.gui"
function BattleHUD:new(controller)
self.controller = controller
self:loadAssets()
end
function BattleHUD:loadAssets()
self.frame = gui.newBorder(424, 30, 8)
end
function BattleHUD:destroy( )
self.frame:release( )
end
function BattleHUD:update(dt)
end
function BattleHUD:draw()
self.controller.assets.fonts["hudnbrs"]:set()
self:drawFrame()
--self.controller:resetFont( )
end
function BattleHUD:drawFrame()
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)
end
return BattleHUD