Skip to content

Commit

Permalink
Update app_piano.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
SweetSea-ButImNotSweet authored Jan 21, 2024
1 parent 6ee7411 commit 9c122ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions parts/scenes/app_piano.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ function scene.enter()
end

function scene.leave()
showingKey=false
TABLE.clear(textObj)
TABLE.clear(pianoVK)
collectgarbage()
Expand Down Expand Up @@ -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)
Expand All @@ -238,4 +238,4 @@ generateVKey=function()
pianoVK.shift:setObject(CHAR.key.shift)
end

return scene
return scene

0 comments on commit 9c122ea

Please sign in to comment.