整 理 代 码

(应该没有改到字符串里面的东西吧…)起码不直接影响运行
This commit is contained in:
MrZ_26
2022-10-01 11:32:11 +08:00
parent 6e00ff96ec
commit 06f4bb4e1a
236 changed files with 2087 additions and 2114 deletions

View File

@@ -23,7 +23,7 @@ end
function scene.keyDown(key,isRep)
if isRep then return end
if state==0 then
if key=='space'then
if key=='space' then
reset()
state=1
ct=60
@@ -34,13 +34,13 @@ function scene.keyDown(key,isRep)
--BEAUTIFUL LOGIC BELOW:
--early = error, [UP-key]==[target is up] = correct sfx, else = wrong sfx
SFX.play(ct>6 and'finesseError'or key%2==1==up and'reach'or'fail')
SFX.play(ct>6 and 'finesseError' or key%2==1==up and 'reach' or 'fail')
--(early && P2-key || not early && [P1-key]==[target is up]) = P1 win, else P2 win
if ct>6 and key>2 or ct<=6 and key%4<2==up then
winner=1;s1=s1+1
winner=1; s1=s1+1
else
winner=2;s2=s2+1
winner=2; s2=s2+1
end
state=3
ct=60
@@ -49,10 +49,10 @@ function scene.keyDown(key,isRep)
end
function scene.touchDown(x,y)
scene.keyDown(
state==0 and"space"or
state==0 and "space" or
x<640 and
(y<360 and"q"or"a")or
(y<360 and"p"or"l")
(y<360 and "q" or "a") or
(y<360 and "p" or "l")
)
end
function scene.update()
@@ -106,7 +106,7 @@ function scene.draw()
if state==0 then
setFont(40)
mStr(MOBILE and"Touch to Start"or"Press space to Start",640,400)
mStr(MOBILE and "Touch to Start" or "Press space to Start",640,400)
mStr("Press key on the same side when block appear!",640,500)
if ct>0 then
setFont(100)