整理代码,较复杂的单行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

@@ -86,8 +86,12 @@ function scene.update()
P.vy=P.vy*.5
end
else
if kb.isDown(P==p1 and"w"or"up")then P.vy=max(P.vy-1,-8)end
if kb.isDown(P==p1 and"s"or"down")then P.vy=min(P.vy+1,8)end
if kb.isDown(P==p1 and"w"or"up")then
P.vy=max(P.vy-1,-8)
end
if kb.isDown(P==p1 and"s"or"down")then
P.vy=min(P.vy+1,8)
end
P.y=P.y+P.vy
P.vy=P.vy*.9
if P.y>650 then