新增方块溅射特效

This commit is contained in:
MrZ626
2020-11-25 14:25:38 +08:00
parent 373fc31408
commit ac76984052
12 changed files with 64 additions and 32 deletions

View File

@@ -17,7 +17,9 @@ return{
dropFX=2,
moveFX=2,
clearFX=2,
shakeFX=3,
splashFX=2,
shakeFX=2,
atkFX=2,
highCam=false,
nextPos=false,

View File

@@ -283,12 +283,14 @@ local function applyGameEnv(P)--Finish gameEnv processing
ENV.dropFX=nil
ENV.moveFX=nil
ENV.clearFX=nil
ENV.splashFX=nil
ENV.shakeFX=nil
else
if ENV.lockFX==0 then ENV.lockFX=nil end
if ENV.dropFX==0 then ENV.dropFX=nil end
if ENV.moveFX==0 then ENV.moveFX=nil end
if ENV.clearFX==0 then ENV.clearFX=nil end
if ENV.splashFX==0 then ENV.splashFX=nil end
if ENV.shakeFX==0 then ENV.shakeFX=nil end
end
if ENV.ghost==0 then ENV.ghost=nil end

View File

@@ -80,6 +80,15 @@ function Player.createMoveFX(P,dir)
end end
end
end
function Player.createSplashFX(P,y)
local L=P.field[y]
for x=1,10 do
local c=L[x]
if c>0 then
SYSFX.newCell(6-P.gameEnv.splashFX,SKIN.curText[c],P.fieldX+30*x-30,P.fieldY+600-30*y,1)
end
end
end
function Player.createClearingFX(P,y,spd)
ins(P.clearFX,{y,0,spd})
end
@@ -849,7 +858,11 @@ do--Player.drop(P)--Place piece
if cc>0 and ENV.clearFX then
local t=7-ENV.clearFX*1
for i=1,cc do
P:createClearingFX(P.clearedRow[i],t)
local y=P.clearedRow[i]
P:createClearingFX(y,t)
if ENV.splashFX then
P:createSplashFX(y)
end
end
end