From 6f7ebb4cbf53925765e7bb7b0a6b922fc99dcf9d Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 30 Sep 2021 01:14:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=9C=89=E4=B8=A4=E4=B8=AA?= =?UTF-8?q?=E5=BD=A9=E8=9B=8B=E6=A8=A1=E5=BC=8F=E7=BA=AF=E9=94=AE=E7=9B=98?= =?UTF-8?q?=E8=BF=9B=E4=B8=8D=E5=8E=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/setting_sound.lua | 10 +++++++++- parts/scenes/staff.lua | 25 ++++++++++--------------- parts/scenes/stat.lua | 7 +++++++ 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/parts/scenes/setting_sound.lua b/parts/scenes/setting_sound.lua index d5144c28..820fac29 100644 --- a/parts/scenes/setting_sound.lua +++ b/parts/scenes/setting_sound.lua @@ -22,7 +22,7 @@ function scene.sceneBack() end 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 local t=TIME()-last if t>1 then @@ -37,6 +37,14 @@ function scene.mouseDown(x,y) end 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() if jump>0 then jump=jump-1 diff --git a/parts/scenes/staff.lua b/parts/scenes/staff.lua index 6728c2c4..471fa077 100644 --- a/parts/scenes/staff.lua +++ b/parts/scenes/staff.lua @@ -20,28 +20,23 @@ end function scene.mouseDown(x,y) local T=40*math.min(time,45) - if not GAME.playing then - if x>230 and x<1050 then - if math.abs(y-800+T)<70 then - loadGame('sprintLock',true) - elseif math.abs(y-2160+T)<70 then - loadGame('sprintFix',true) - end + if x>230 and x<1050 then + if math.abs(y-800+T)<70 then + loadGame('sprintLock',true) + elseif math.abs(y-2160+T)<70 then + loadGame('sprintFix',true) end end end scene.touchDown=scene.mouseDown -function scene.keyDown(key,isRep) - if isRep then return end +function scene.keyDown(key) if key=="escape"then SCN.back() - elseif not GAME.playing then - if key=="l"then - loadGame('sprintLock',true) - elseif key=="f"then - loadGame('sprintFix',true) - end + elseif key=="l"then + loadGame('sprintLock',true) + elseif key=="f"then + loadGame('sprintFix',true) end end diff --git a/parts/scenes/stat.lua b/parts/scenes/stat.lua index 14786263..6e26eca7 100644 --- a/parts/scenes/stat.lua +++ b/parts/scenes/stat.lua @@ -53,6 +53,13 @@ function scene.mouseDown(x,y) end end 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() local minoColor,skinSet=minoColor,SETTING.skin