Skip to content

Commit

Permalink
修interior暂停页面可以通过键盘进入设置菜单
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Jul 11, 2024
1 parent 1eb602c commit 923dd50
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions assets/scene/pause_in.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

0 comments on commit 923dd50

Please sign in to comment.