攻击特效从全局改为玩家设置项一部分

This commit is contained in:
MrZ626
2021-04-11 02:18:01 +08:00
parent 5f02042124
commit e0c594c402
3 changed files with 9 additions and 8 deletions

View File

@@ -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

View File

@@ -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
--------------------------</FX>--------------------------
@@ -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

View File

@@ -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