From 923dd50ab313009243fb233fba906bdcec889f3b Mon Sep 17 00:00:00 2001 From: MrZ_26 <1046101471@qq.com> Date: Fri, 12 Jul 2024 06:07:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AEinterior=E6=9A=82=E5=81=9C=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=8F=AF=E4=BB=A5=E9=80=9A=E8=BF=87=E9=94=AE=E7=9B=98?= =?UTF-8?q?=E8=BF=9B=E5=85=A5=E8=AE=BE=E7=BD=AE=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/scene/pause_in.lua | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/assets/scene/pause_in.lua b/assets/scene/pause_in.lua index 5ca9231b..a5b2d5d6 100644 --- a/assets/scene/pause_in.lua +++ b/assets/scene/pause_in.lua @@ -27,7 +27,12 @@ local function sysAction(action) elseif action=='restart' then SCN.swapTo('game_in','none',GAME.mode.name) elseif action=='setting' then - SCN.go('setting_in','none') + if PROGRESS.get('main')<=2 or isCtrlPressed() then + SCN.go('setting_in','none') + else + FMOD.effect('move_failed') + FMOD.effect('suffocate',{tune=MATH.rand(-6,2)}) + end end end function scene.keyDown(key,isRep) @@ -64,15 +69,6 @@ scene.widgetList={ {type='button',pos={0,.5},x=210,y=-360,w=200,h=80,lineWidth=4,cornerR=0,sound_trigger='button_back',fontSize=60,text=CHAR.icon.back,code=WIDGET.c_backScn('none')}, {type='button',pos={.5,.5},x=300*-1,y=-160,w=260,h=100,lineWidth=4,cornerR=0,fontSize=60,text=CHAR.icon.play, code=function() sysAction('back') end}, {type='button',pos={.5,.5},x=300*0,y=-160,w=260,h=100,lineWidth=4,cornerR=0,fontSize=60,text=CHAR.icon.retry, code=function() sysAction('restart') end}, - {type='button',pos={.5,.5},x=300*1,y=-160,w=260,h=100,lineWidth=4,cornerR=0,fontSize=60,text=CHAR.icon.settings, - code=function() - if PROGRESS.get('main')<=2 or isCtrlPressed() then - sysAction('setting') - else - FMOD.effect('move_failed') - FMOD.effect('suffocate',{tune=MATH.rand(-6,2)}) - end - end, - }, + {type='button',pos={.5,.5},x=300*1,y=-160,w=260,h=100,lineWidth=4,cornerR=0,fontSize=60,text=CHAR.icon.settings, code=function() sysAction('setting') end,}, } return scene