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