修复溅射特效位置偏移

This commit is contained in:
MrZ626
2020-11-26 17:14:55 +08:00
parent 521dea8c0e
commit 89bde6e6a1
2 changed files with 8 additions and 7 deletions

View File

@@ -86,7 +86,7 @@ function FXdraw.shade(S)
end
function FXdraw.cell(S,dt)
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
local SYSFX={}
@@ -159,8 +159,8 @@ function SYSFX.newCell(rate,image,size,x,y,vx,vy,ax,ay)
draw=FXdraw.cell,
t=0,
rate=rate*(.9+rnd()*.2),
image=image,
size=size,
image=image,size=size,
cx=image:getWidth()*.5,cy=image:getHeight()*.5,
x=x,y=y,
vx=vx,vy=vy,
ax=ax,ay=ay,