From 84cab7c92a8f7ea2883ab5c48dd764850491ad77 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Fri, 1 May 2020 16:15:39 +0200 Subject: [PATCH] fix: adapt HUD to new turn system --- sonic-radiance.love/scenes/battlesystem/gui/hud.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sonic-radiance.love/scenes/battlesystem/gui/hud.lua b/sonic-radiance.love/scenes/battlesystem/gui/hud.lua index 0ece6c3..469cad4 100644 --- a/sonic-radiance.love/scenes/battlesystem/gui/hud.lua +++ b/sonic-radiance.love/scenes/battlesystem/gui/hud.lua @@ -8,12 +8,13 @@ function HUD:new(scene) self.scene = scene self.world = scene.world self.assets = scene.assets + self.turns = scene.turns self.frame = gui.newBorder(424, 30, 4) self.tweens = TweenManager(self) self.playerHUDPosition = -64 - self.battlerCursor = self.world.turns.current + self.battlerCursor = self.turns.turns.current end function HUD:update(dt) @@ -41,12 +42,12 @@ function HUD:draw() battler:drawHUD() end - for i, action in ipairs(self.world.actionlist) do + for i, action in ipairs(self.turns.actionList) do action.actor:drawIcon(4 + (i-1)*(20), 6) end local cursorx = self.battlerCursor * 20 - 6 - if #self.world.actionlist > 0 then + if #self.turns.actionList > 0 then self.assets.images["menucursor"]:draw(cursorx, 26, math.rad(-90), 1, 1, 4, 8) end @@ -55,7 +56,7 @@ function HUD:draw() love.graphics.draw(self.frame, 424, 20, 0, -1, -1) self.assets.images["hudturn"]:draw(x, y) self.assets.fonts["hudnbrs"]:set() - local turnnbr = self.world.turns.number + local turnnbr = self.turns.turns.number if (turnnbr < 10) then turnnbr = "0" .. turnnbr end