修正有两个彩蛋模式纯键盘进不去

This commit is contained in:
MrZ626
2021-09-30 01:14:25 +08:00
parent 43db02f97d
commit 6f7ebb4cbf
3 changed files with 26 additions and 16 deletions

View File

@@ -22,7 +22,7 @@ function scene.sceneBack()
end end
function scene.mouseDown(x,y) function scene.mouseDown(x,y)
if x>780 and x<980 and y>470 and jump==0 then if x>780 and x<980 and y>470 and y<720 and jump==0 then
jump=10 jump=10
local t=TIME()-last local t=TIME()-last
if t>1 then if t>1 then
@@ -37,6 +37,14 @@ function scene.mouseDown(x,y)
end end
scene.touchDown=scene.mouseDown scene.touchDown=scene.mouseDown
function scene.keyDown(key)
if key=="escape"then
SCN.back()
elseif key=="space"then
scene.mouseDown(942,626)
end
end
function scene.update() function scene.update()
if jump>0 then if jump>0 then
jump=jump-1 jump=jump-1

View File

@@ -20,7 +20,6 @@ end
function scene.mouseDown(x,y) function scene.mouseDown(x,y)
local T=40*math.min(time,45) local T=40*math.min(time,45)
if not GAME.playing then
if x>230 and x<1050 then if x>230 and x<1050 then
if math.abs(y-800+T)<70 then if math.abs(y-800+T)<70 then
loadGame('sprintLock',true) loadGame('sprintLock',true)
@@ -29,21 +28,17 @@ function scene.mouseDown(x,y)
end end
end end
end end
end
scene.touchDown=scene.mouseDown scene.touchDown=scene.mouseDown
function scene.keyDown(key,isRep) function scene.keyDown(key)
if isRep then return end
if key=="escape"then if key=="escape"then
SCN.back() SCN.back()
elseif not GAME.playing then elseif key=="l"then
if key=="l"then
loadGame('sprintLock',true) loadGame('sprintLock',true)
elseif key=="f"then elseif key=="f"then
loadGame('sprintFix',true) loadGame('sprintFix',true)
end end
end end
end
function scene.update(dt) function scene.update(dt)
if(kb.isDown("space","return")or tc.getTouches()[1])and v<6.26 then if(kb.isDown("space","return")or tc.getTouches()[1])and v<6.26 then

View File

@@ -53,6 +53,13 @@ function scene.mouseDown(x,y)
end end
end end
scene.touchDown=scene.mouseDown scene.touchDown=scene.mouseDown
function scene.keyDown(key)
if key=="escape"then
SCN.back()
elseif love.keyboard.isDown("M")and love.keyboard.isDown("D")then
loadGame('sprintMD',true)
end
end
function scene.draw() function scene.draw()
local minoColor,skinSet=minoColor,SETTING.skin local minoColor,skinSet=minoColor,SETTING.skin