From 2d1ea4c2a0ab892a152f87d7b155b54557684e3c Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 25 Apr 2021 12:21:17 +0200 Subject: [PATCH] feat: add QTE drawing --- .../scenes/battlesystem/controllers/fighters/character.lua | 3 +++ .../controllers/fighters/systems/actions/parent.lua | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/character.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/character.lua index 7d4be37..a113463 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/character.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/character.lua @@ -144,6 +144,9 @@ function HeroFighter:drawHUD() local x = (self.id-0.5)*boxSize local y = self.turnSystem.hud:getPlayerHUDPosition() self.statusbar:draw(x - HUDSIZE/2, y) + if (self.action ~= nil) then + self.action:draw() + end end return HeroFighter diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/parent.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/parent.lua index d1f6c5f..467b7ac 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/parent.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/parent.lua @@ -53,4 +53,10 @@ function ActionParent:finishAction() self.fighter:finishAction() end +function ActionParent:draw() + if (self.choregraphy ~= nil) then + self.choregraphy:draw() + end +end + return ActionParent