微调两个小程序的返回按钮功能,修复移动端触屏无法退出dropper

This commit is contained in:
MrZ626
2021-03-14 21:38:14 +08:00
parent 3e25f9c1d7
commit 32b75cbec3
2 changed files with 26 additions and 38 deletions

View File

@@ -61,22 +61,12 @@ function scene.keyDown(key)
state="move"
end
elseif key=="escape"then
if state=="menu"or state=="dead"then
SCN.back()
else
move.x,move.y,move.l=1e99,0,0
highScore=max(score,highScore)
highFloor=max(floor,floor)
SFX.play("lose")
state="dead"
end
SCN.back()
end
end
function scene.mouseDown(k)
function scene.mouseDown(_,_,k)
if k==1 then
scene.keyDown("space")
elseif k==2 then
scene.keyDown("escape")
end
end
function scene.touchDown()