整理代码,较复杂的单行if-then-end拆成多行

This commit is contained in:
MrZ626
2021-09-03 00:28:08 +08:00
parent 827d0cdf5a
commit 57497dbd74
66 changed files with 703 additions and 261 deletions

View File

@@ -43,7 +43,9 @@ function scene.touchDown(x,y)
end
function scene.update()
if jump>0 then jump=jump-1 end
if jump>0 then
jump=jump-1
end
end
function scene.draw()
@@ -83,7 +85,9 @@ scene.widgetList={
WIDGET.newKey{name="mute", x=1160,y=180,w=80,color='lR',fText=TEXTURE.mute,
code=function()
if SETTING.sfx+SETTING.sfx_spawn+SETTING.sfx_warn+SETTING.bgm+SETTING.vib+SETTING.voc==0 then
if not soundBeforeMute then soundBeforeMute={1,0,.4,.7,0,0}end
if not soundBeforeMute then
soundBeforeMute={1,0,.4,.7,0,0}
end
SETTING.sfx,SETTING.sfx_spawn,SETTING.sfx_warn,SETTING.bgm,SETTING.vib,SETTING.voc=unpack(soundBeforeMute)
soundBeforeMute=false
else