暂停界面可以按自定义的重开键

This commit is contained in:
MrZ_26
2024-02-29 15:41:56 +08:00
parent 1859e5bb96
commit 1c190d9544

View File

@@ -165,6 +165,8 @@ function scene.keyDown(key,isRep)
SFX.play('clear_3')
SYSFX.newShade(1.2,555,200,620,380,.6,.6,.6)
end
elseif KEY_MAP.keyboard[key]==0 then -- custom restart key
scene.keyDown('r')
else
return true
end
@@ -187,6 +189,14 @@ end
scene.mouseUp=scene.touchUp
scene.mouseDown=scene.touchDown
function scene.gamepadDown(key)
if key=='back' then
scene.keyDown('escape')
elseif KEY_MAP.joystick[key]==0 then
scene.keyDown('r')
end
end
function scene.update(dt)
if not (GAME.result or GAME.replaying) then
GAME.pauseTime=GAME.pauseTime+dt