From 1d36d50fcab8869df829ff75fcb8bf1602e2b151 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Wed, 5 May 2021 10:51:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=B8=BB=E8=8F=9C=E5=8D=95ai=E8=A7=92?= =?UTF-8?q?=E6=A1=86=EF=BC=8C=E4=BF=AE=E5=A4=8D=E8=A7=A6=E5=B1=8F=E5=9C=A8?= =?UTF-8?q?=E6=88=BF=E9=97=B4=E5=86=85=E4=BC=9A=E4=B8=8D=E8=83=BD=E6=93=8D?= =?UTF-8?q?=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/update.lua | 12 ++++++------ parts/scenes/main.lua | 8 -------- parts/scenes/net_game.lua | 13 +++++-------- 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/parts/player/update.lua b/parts/player/update.lua index c004358b..3ce16ebb 100644 --- a/parts/player/update.lua +++ b/parts/player/update.lua @@ -280,7 +280,7 @@ function update.alive(P,dt) if P.falling>=0 then P.falling=P.falling-1 if P.falling>=0 then - goto stop + goto THROW_stop else local L=#P.clearingRow if P.sound and ENV.fall>0 and #P.field+L>P.clearingRow[L]then SFX.play('fall')end @@ -289,11 +289,11 @@ function update.alive(P,dt) end --Try spawn new block - if not P.control then goto stop end + if not P.control then goto THROW_stop end if P.waiting>=0 then P.waiting=P.waiting-1 if P.waiting<0 then P:popNext()end - goto stop + goto THROW_stop end --Natural block falling @@ -302,7 +302,7 @@ function update.alive(P,dt) local D=P.dropDelay if D>1 then P.dropDelay=D-1 - goto stop + goto THROW_stop end if D==1 then @@ -335,14 +335,14 @@ function update.alive(P,dt) end else P.lockDelay=P.lockDelay-1 - if P.lockDelay>=0 then goto stop end + if P.lockDelay>=0 then goto THROW_stop end P:drop() if P.AI_mode=='CC'and P.AI_bot then CC.updateField(P) end end end - ::stop:: + ::THROW_stop:: --B2B bar animation if P.b2b1==P.b2b then diff --git a/parts/scenes/main.lua b/parts/scenes/main.lua index bdc894a0..0c028e76 100644 --- a/parts/scenes/main.lua +++ b/parts/scenes/main.lua @@ -161,14 +161,6 @@ function scene.draw() --Player PLAYERS[1]:draw() - --Special area - gc.setColor(1,1,1,.8) - gc.setLineWidth(10) - gc.line(515,215,515,135,595,135) - gc.line(765,215,765,135,685,135) - gc.line(515,545,515,625,595,625) - gc.line(765,545,765,625,685,625) - --Profile drawSelfProfile() end diff --git a/parts/scenes/net_game.lua b/parts/scenes/net_game.lua index 62c6cb58..81d8c046 100644 --- a/parts/scenes/net_game.lua +++ b/parts/scenes/net_game.lua @@ -35,7 +35,7 @@ end scene.mouseDown=NULL function scene.mouseMove(x,y)netPLY.mouseMove(x,y)end function scene.touchDown(x,y) - if noTouch or not playing then return end + if not playing or noTouch then return end local t=VK.on(x,y) if t then @@ -44,7 +44,7 @@ function scene.touchDown(x,y) end end function scene.touchUp(x,y) - if noTouch or not playing then return end + if not playing or noTouch then return end local n=VK.on(x,y) if n then @@ -53,8 +53,8 @@ function scene.touchUp(x,y) end end function scene.touchMove(x,y) - if not playing then netPLY.mouseMove(x,y)return end - if noTouch or touchMoveLastFrame then return end + if not playing then netPLY.mouseMove(x,y)end + if touchMoveLastFrame or noTouch then return end touchMoveLastFrame=true local L=tc.getTouches() @@ -120,7 +120,6 @@ function scene.gamepadDown(key) LOG.print(text.sureQuit,COLOR.O) end else - if noKey then return end local k=keyMap.joystick[key] if k and k>0 then PLAYERS[1]:pressKey(k) @@ -129,12 +128,10 @@ function scene.gamepadDown(key) end end function scene.gamepadUp(key) - if noKey then return end local k=keyMap.joystick[key] if k and k>0 then PLAYERS[1]:releaseKey(k) VK.release(k) - return end end @@ -288,7 +285,7 @@ scene.widgetList={ netPLY.getReady(1)or NET.getlock('ready') end}, - WIDGET.newKey{name="cancel",x=900,y=560,w=400,h=100,color='H',font=40,code=pressKey"space", + WIDGET.newKey{name="cancel",x=1060,y=630,w=300,h=80,color='H',font=40,code=pressKey"space", hide=function() return playing or