整理代码,较复杂的单行if-then-end拆成多行
This commit is contained in:
@@ -28,7 +28,9 @@ return
|
||||
P.modeData.target=26
|
||||
SFX.play('reach')
|
||||
elseif T==26 then--Stage 3: dig to bottom
|
||||
if not P.holdQueue[1]then P.life=P.life+1 end--1 up if ban hold
|
||||
if not P.holdQueue[1]then--1 up if ban hold
|
||||
P.life=P.life+1
|
||||
end
|
||||
P.waiting=45
|
||||
ENV.skin[1],ENV.skin[2]=ENV.skin[2],ENV.skin[1]
|
||||
ENV.skin[3],ENV.skin[4]=ENV.skin[4],ENV.skin[3]
|
||||
|
||||
@@ -14,7 +14,9 @@ return{
|
||||
table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=1,countdown=30,cd0=30,time=0,sent=false,lv=1})
|
||||
P.atkBufferSum=P.atkBufferSum+1
|
||||
P.stat.recv=P.stat.recv+1
|
||||
if D.wave==45 then P:_showText(text.maxspeed,0,-140,100,'appear',.6)end
|
||||
if D.wave==45 then
|
||||
P:_showText(text.maxspeed,0,-140,100,'appear',.6)
|
||||
end
|
||||
D.timer=0
|
||||
D.wave=D.wave+1
|
||||
end
|
||||
|
||||
@@ -21,7 +21,9 @@ return{
|
||||
end
|
||||
P.atkBufferSum=P.atkBufferSum+s
|
||||
P.stat.recv=P.stat.recv+s
|
||||
if D.wave==60 then P:_showText(text.maxspeed,0,-140,100,'appear',.6)end
|
||||
if D.wave==60 then
|
||||
P:_showText(text.maxspeed,0,-140,100,'appear',.6)
|
||||
end
|
||||
D.timer=0
|
||||
D.wave=D.wave+1
|
||||
end
|
||||
|
||||
@@ -15,7 +15,9 @@ return{
|
||||
table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3})
|
||||
P.atkBufferSum=P.atkBufferSum+4
|
||||
P.stat.recv=P.stat.recv+4
|
||||
if D.wave==60 then P:_showText(text.maxspeed,0,-140,100,'appear',.6)end
|
||||
if D.wave==60 then
|
||||
P:_showText(text.maxspeed,0,-140,100,'appear',.6)
|
||||
end
|
||||
D.timer=0
|
||||
D.wave=D.wave+1
|
||||
end
|
||||
|
||||
@@ -20,7 +20,9 @@ return{
|
||||
)
|
||||
P.atkBufferSum=P.atkBufferSum+d%4+1
|
||||
P.stat.recv=P.stat.recv+d%4+1
|
||||
if D.wave==45 then P:_showText(text.maxspeed,0,-140,100,'appear',.6)end
|
||||
if D.wave==45 then
|
||||
P:_showText(text.maxspeed,0,-140,100,'appear',.6)
|
||||
end
|
||||
D.timer=0
|
||||
D.wave=d
|
||||
end
|
||||
|
||||
@@ -18,7 +18,9 @@ return{
|
||||
table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=6,countdown=1.5*t,cd0=1.5*t,time=0,sent=false,lv=5})
|
||||
P.atkBufferSum=P.atkBufferSum+20
|
||||
P.stat.recv=P.stat.recv+20
|
||||
if D.wave==31 then P:_showText(text.maxspeed,0,-140,100,'appear',.6)end
|
||||
if D.wave==31 then
|
||||
P:_showText(text.maxspeed,0,-140,100,'appear',.6)
|
||||
end
|
||||
D.timer=0
|
||||
D.wave=D.wave+1
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user