控件模块/场景代码更好地响应系统长按

This commit is contained in:
MrZ626
2021-06-17 22:17:35 +08:00
parent 37a3e36bd5
commit e5a3b6c6ac
35 changed files with 143 additions and 165 deletions

View File

@@ -38,16 +38,13 @@ function scene.sceneInit()
end
BG.set('none')
BGM.play('dream')
love.keyboard.setKeyRepeat(false)
end
function scene.sceneBack()
love.keyboard.setKeyRepeat(true)
end
function scene.keyDown(k)
if k=="escape"then
function scene.keyDown(key,isRep)
if isRep then return end
if key=="escape"then
SCN.back()
elseif k=="space"then
elseif key=="space"then
if state==0 then--main
if timer==0 then
state=1