修复软件锁按方括号和点击鼠标报错

This commit is contained in:
MrZ626
2021-03-08 12:43:22 +08:00
parent f17a776c14
commit d1d2def4b0

View File

@@ -148,14 +148,14 @@ function scene.sceneBack()
love.event.quit() love.event.quit()
end end
function scene.keyDown(k) function scene.keyDown(key)
if k=="escape"then if key=="escape"then
SCN.back() SCN.back()
elseif k=="s"then elseif key=="s"then
skip=999 skip=999
elseif locked and("12345679"):match(k)then elseif locked and("12345679"):match(key,nil,false)then
k=tonumber(k) key=tonumber(key)
light[3*k]=not light[3*k] light[3*key]=not light[3*key]
if light[6]and light[18]then if light[6]and light[18]then
locked=false locked=false
end end
@@ -175,7 +175,7 @@ function scene.mouseDown(x,y)
end end
end end
end end
scene.keyDown() scene.keyDown("mouse")
end end
scene.touchDown=scene.mouseDown scene.touchDown=scene.mouseDown