From 9c122ea819feaa1e858cef00c850f870d9107000 Mon Sep 17 00:00:00 2001 From: C6H12O6 + NaCl + H2O <106439598+SweetSea-ButImNotSweet@users.noreply.github.com> Date: Sun, 21 Jan 2024 16:22:43 +0700 Subject: [PATCH] Update app_piano.lua --- parts/scenes/app_piano.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parts/scenes/app_piano.lua b/parts/scenes/app_piano.lua index 5c9258656..1c78662e8 100644 --- a/parts/scenes/app_piano.lua +++ b/parts/scenes/app_piano.lua @@ -98,6 +98,7 @@ function scene.enter() end function scene.leave() + showingKey=false TABLE.clear(textObj) TABLE.clear(pianoVK) collectgarbage() @@ -217,8 +218,7 @@ generateVKey=function() if activateState~=nil then self.activateState=activateState elseif (self.activateState==1 and activationTime==maxTime) or not self.activateState then self.activateState=0 end - -- LIKELY NOT POSSIBLE TO DO - -- Holding key: self.activateState=activateState and activateState or not activationTime>maxTime and self.activateState or 0 end + -- TODO: when the note can be extended longer, this will need remaking if dt then if self.activateState>0 then self.ATV=min(activationTime+dt*60,maxTime) elseif activationTime>0 then self.ATV=max(activationTime-dt*30,0) @@ -238,4 +238,4 @@ generateVKey=function() pianoVK.shift:setObject(CHAR.key.shift) end -return scene \ No newline at end of file +return scene