From 1f5698ce15607a6fd0f4437768f0d7c3083dbfc7 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 19 Dec 2020 16:01:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=A9=E5=AE=B6=E5=87=BA=E5=9C=BA=E5=8A=A8?= =?UTF-8?q?=E7=94=BB=E5=8A=A0=E9=80=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/player.lua | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/parts/player/player.lua b/parts/player/player.lua index 02bd28fe..462b55a2 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -6,7 +6,6 @@ local Player={}--Player class local int,ceil,rnd=math.floor,math.ceil,math.random local max,min=math.max,math.min -local lg=math.log10 local ins,rem=table.insert,table.remove local ct=coroutine @@ -154,15 +153,13 @@ local function task_movePosition(P,x,y,size) local x1,y1,size1=P.x,P.y,P.size while true do coroutine.yield() - local d=((x1-x)^2+(y1-y)^2)^.5 - if d<.626 then + if (x1-x)^2+(y1-y)^2<1 then P:setPosition(x,y,size) return true else - d=max(.085-lg(d)*.02,.03) - x1=x1+(x-x1)*d - y1=y1+(y-y1)*d - size1=size1+(size-size1)*d + x1=x1+(x-x1)*.126 + y1=y1+(y-y1)*.126 + size1=size1+(size-size1)*.126 P:setPosition(x1,y1,size1) end end @@ -1279,7 +1276,7 @@ do--Player.drop(P)--Place piece cscore=int(cscore) if ENV.score then - P:showText(cscore,(P.curX+P.sc[2]-5.5)*30,(10-P.curY-P.sc[1])*30+P.fieldBeneath+P.fieldUp,int(8-120/(cscore+20))*5,"score",2) + P:showText(cscore,(P.curX+P.sc[2]-5.5)*30,(10-P.curY-P.sc[1])*30+P.fieldBeneath+P.fieldUp,40-600/(cscore+20),"score",2) end piece.row,piece.dig=cc,gbcc