From 9af190529c6892e0fecbb9fc91a61d114d1747d7 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Wed, 5 May 2021 11:12:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=A5=E5=BE=AE=E4=BC=98=E5=8C=96=E6=80=A7?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/update.lua | 18 +++++++++++------- parts/scenes/mode.lua | 3 +-- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/parts/player/update.lua b/parts/player/update.lua index 3ce16ebb..3b8620d7 100644 --- a/parts/player/update.lua +++ b/parts/player/update.lua @@ -3,7 +3,11 @@ local int,abs,rnd=math.floor,math.abs,math.random local rem=table.remove local assert,resume,status=assert,coroutine.resume,coroutine.status -local function updateLine(P)--Attacks, line pushing, cam moving +local TEXT,GAME=TEXT,GAME +local PLAYERS,PLY_ALIVE=PLAYERS,PLY_ALIVE + + +local function updateLine(P)--Attacks, line pushing, camear moving local bf=P.atkBuffer for i=#bf,1,-1 do local A=bf[i] @@ -280,7 +284,7 @@ function update.alive(P,dt) if P.falling>=0 then P.falling=P.falling-1 if P.falling>=0 then - goto THROW_stop + goto 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 +293,11 @@ function update.alive(P,dt) end --Try spawn new block - if not P.control then goto THROW_stop end + if not P.control then goto stop end if P.waiting>=0 then P.waiting=P.waiting-1 if P.waiting<0 then P:popNext()end - goto THROW_stop + goto stop end --Natural block falling @@ -302,7 +306,7 @@ function update.alive(P,dt) local D=P.dropDelay if D>1 then P.dropDelay=D-1 - goto THROW_stop + goto stop end if D==1 then @@ -335,14 +339,14 @@ function update.alive(P,dt) end else P.lockDelay=P.lockDelay-1 - if P.lockDelay>=0 then goto THROW_stop end + if P.lockDelay>=0 then goto stop end P:drop() if P.AI_mode=='CC'and P.AI_bot then CC.updateField(P) end end end - ::THROW_stop:: + ::stop:: --B2B bar animation if P.b2b1==P.b2b then diff --git a/parts/scenes/mode.lua b/parts/scenes/mode.lua index fe6065dd..2da29463 100644 --- a/parts/scenes/mode.lua +++ b/parts/scenes/mode.lua @@ -21,8 +21,7 @@ local scene={} function scene.sceneInit(org) BG.set() destroyPlayers() - local cam=mapCam - cam.zoomK=org=="main"and 5 or 1 + mapCam.zoomK=org=="main"and 5 or 1 end local function getK()