From 32b75cbec3dfff31e5e042ffc8cdcc611df7778b Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 14 Mar 2021 21:38:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83=E4=B8=A4=E4=B8=AA=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E7=9A=84=E8=BF=94=E5=9B=9E=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BF=AE=E5=A4=8D=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF=E8=A7=A6=E5=B1=8F=E6=97=A0=E6=B3=95=E9=80=80=E5=87=BA?= =?UTF-8?q?dropper?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/app_dropper.lua | 14 ++-------- parts/scenes/app_polyforge.lua | 50 ++++++++++++++++------------------ 2 files changed, 26 insertions(+), 38 deletions(-) diff --git a/parts/scenes/app_dropper.lua b/parts/scenes/app_dropper.lua index 65e6b32a..55b28800 100644 --- a/parts/scenes/app_dropper.lua +++ b/parts/scenes/app_dropper.lua @@ -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() diff --git a/parts/scenes/app_polyforge.lua b/parts/scenes/app_polyforge.lua index 221d9e34..0cb874be 100644 --- a/parts/scenes/app_polyforge.lua +++ b/parts/scenes/app_polyforge.lua @@ -47,34 +47,32 @@ end function scene.keyDown(k) if k=="escape"then SCN.back() - else - - end - if k~="space"then return end - if state==0 then--main - if timer==0 then - state=1 - end - elseif state==3 then--play - local c=(math.floor((pos-ang)*side/tau)-1)%side+1 - if hit[c]==0 then - hit[c]=1 - count=count+1 - SFX.play(side<26 and"ren_"..rnd(5)or"ren_"..rnd(6,11)) - if count>=12 then - SFX.play("ren_mega",(count-11)/15) - end - if count==side then + elseif k=="space"then + if state==0 then--main + if timer==0 then + state=1 + end + elseif state==3 then--play + local c=(math.floor((pos-ang)*side/tau)-1)%side+1 + if hit[c]==0 then + hit[c]=1 + count=count+1 + SFX.play(side<26 and"ren_"..rnd(5)or"ren_"..rnd(6,11)) + if count>=12 then + SFX.play("ren_mega",(count-11)/15) + end + if count==side then + state=1 + SFX.play("spin_0") + else + SFX.play("lock") + end + else + hit[c]=2 + SFX.play("emit") + needReset=true state=1 - SFX.play("spin_0") - else - SFX.play("lock") end - else - hit[c]=2 - SFX.play("emit") - needReset=true - state=1 end end end