From e0c594c40256d559abb16297d37ca5db5e3f9e77 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 11 Apr 2021 02:18:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=BB=E5=87=BB=E7=89=B9=E6=95=88=E4=BB=8E?= =?UTF-8?q?=E5=85=A8=E5=B1=80=E6=94=B9=E4=B8=BA=E7=8E=A9=E5=AE=B6=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=A1=B9=E4=B8=80=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/init.lua | 1 + parts/player/player.lua | 12 ++++++------ parts/player/update.lua | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/parts/player/init.lua b/parts/player/init.lua index b4d32efc..98eb955e 100644 --- a/parts/player/init.lua +++ b/parts/player/init.lua @@ -330,6 +330,7 @@ local function applyGameEnv(P)--Finish gameEnv processing if ENV.clearFX==0 then ENV.clearFX=false end if ENV.splashFX==0 then ENV.splashFX=false end if ENV.shakeFX==0 then ENV.shakeFX=false end + if ENV.atkFX==0 then ENV.atkFX=false end end if ENV.ghost==0 then ENV.ghost=false end if ENV.center==0 then ENV.center=false end diff --git a/parts/player/player.lua b/parts/player/player.lua index 455ee57b..7d3b8019 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -97,7 +97,7 @@ end function Player:createClearingFX(y,spd) ins(self.clearFX,{y,0,spd}) end -function Player:createBeam(R,send,color) +function Player:createBeam(R,send,power,color) local x1,y1,x2,y2 if self.mini then x1,y1=self.centerX,self.centerY else x1,y1=self.x+(30*(self.curX+self.cur.sc[2])-30+15+150)*self.size,self.y+(600-30*(self.curY+self.cur.sc[1])+15)*self.size @@ -110,7 +110,7 @@ function Player:createBeam(R,send,color) local r,g,b=c[1]*2,c[2]*2,c[3]*2 local a=GAME.modeEnv.royaleMode and not(self.type=="human"or R.type=="human")and .2 or 1 - SYSFX.newAttack(1-SETTING.atkFX*.1,x1,y1,x2,y2,int(send^.7*(4+SETTING.atkFX)),r,g,b,a*(SETTING.atkFX+2)*.0626) + SYSFX.newAttack(1-power*.1,x1,y1,x2,y2,int(send^.7*(4+power)),r,g,b,a*(power+2)*.0626) end ---------------------------------------------------- @@ -1322,8 +1322,8 @@ do--Player.drop(self)--Place piece if M>0 then for i=1,M do self:attack(self.atker[i],send,sendTime,generateLine(self:RND(10))) - if SETTING.atkFX>0 then - self:createBeam(self.atker[i],send,C.color) + if ENV.atkFX then + self:createBeam(self.atker[i],send,ENV.atkFX,C.color) end end else @@ -1338,8 +1338,8 @@ do--Player.drop(self)--Place piece end if T then self:attack(T,send,sendTime,generateLine(self:RND(10))) - if SETTING.atkFX>0 then - self:createBeam(T,send,C.color) + if ENV.atkFX then + self:createBeam(T,send,ENV.atkFX,C.color) end end end diff --git a/parts/player/update.lua b/parts/player/update.lua index c00c9e76..4a38f92e 100644 --- a/parts/player/update.lua +++ b/parts/player/update.lua @@ -398,8 +398,8 @@ function update.remote_alive(P,dt) for i=1,#L do if L[i].sid==sid then P:attack(L[i],amount,time,line,true) - if SETTING.atkFX>0 then - P:createBeam(L[i],amount,P.cur.color) + if P.gameEnv.atkFX then + P:createBeam(L[i],amount,P.gameEnv.atkFX,P.cur.color) end break end