修复溅射特效位置偏移
This commit is contained in:
@@ -86,7 +86,7 @@ function FXdraw.shade(S)
|
|||||||
end
|
end
|
||||||
function FXdraw.cell(S,dt)
|
function FXdraw.cell(S,dt)
|
||||||
setColor(1,1,1,1-S.t)
|
setColor(1,1,1,1-S.t)
|
||||||
gc.draw(S.image,S.x,S.y,nil,S.size)
|
gc.draw(S.image,S.x,S.y,nil,S.size,nil,S.cx,S.cy)
|
||||||
end
|
end
|
||||||
|
|
||||||
local SYSFX={}
|
local SYSFX={}
|
||||||
@@ -159,8 +159,8 @@ function SYSFX.newCell(rate,image,size,x,y,vx,vy,ax,ay)
|
|||||||
draw=FXdraw.cell,
|
draw=FXdraw.cell,
|
||||||
t=0,
|
t=0,
|
||||||
rate=rate*(.9+rnd()*.2),
|
rate=rate*(.9+rnd()*.2),
|
||||||
image=image,
|
image=image,size=size,
|
||||||
size=size,
|
cx=image:getWidth()*.5,cy=image:getHeight()*.5,
|
||||||
x=x,y=y,
|
x=x,y=y,
|
||||||
vx=vx,vy=vy,
|
vx=vx,vy=vy,
|
||||||
ax=ax,ay=ay,
|
ax=ax,ay=ay,
|
||||||
|
|||||||
@@ -83,15 +83,16 @@ function Player.createMoveFX(P,dir)
|
|||||||
end
|
end
|
||||||
function Player.createSplashFX(P,h)
|
function Player.createSplashFX(P,h)
|
||||||
local L=P.field[h]
|
local L=P.field[h]
|
||||||
local y=P.fieldY+P.size*(P.fieldOff.y+P.fieldBeneath+P.fieldUp+585)
|
local size=P.size
|
||||||
|
local y=P.fieldY+size*(P.fieldOff.y+P.fieldBeneath+P.fieldUp+615)
|
||||||
for x=1,10 do
|
for x=1,10 do
|
||||||
local c=L[x]
|
local c=L[x]
|
||||||
if c>0 then
|
if c>0 then
|
||||||
SYSFX.newCell(
|
SYSFX.newCell(
|
||||||
3-P.gameEnv.splashFX*.5,
|
2.5-P.gameEnv.splashFX*.4,
|
||||||
SKIN.curText[c],
|
SKIN.curText[c],
|
||||||
1,
|
size,
|
||||||
P.fieldX+30*x-15,y-30*h,
|
P.fieldX+(30*x-15)*size,y-30*h*size,
|
||||||
rnd()*5-2.5,rnd()*-1,
|
rnd()*5-2.5,rnd()*-1,
|
||||||
0,.6
|
0,.6
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user