调整sysFX的使用参数
This commit is contained in:
@@ -108,7 +108,7 @@ function love.mousepressed(x,y,k,touch)
|
||||
WIDGET.press(mx,my)
|
||||
end
|
||||
lastX,lastY=mx,my
|
||||
SYSFX.newRipple(.3,mx,my,30)
|
||||
SYSFX.newRipple(3,mx,my,30)
|
||||
end
|
||||
function love.mousemoved(x,y,dx,dy,t)
|
||||
if t then return end
|
||||
@@ -191,7 +191,7 @@ function love.touchreleased(id,x,y)
|
||||
if touchClick[SCN.cur]then
|
||||
touchClick[SCN.cur](x,y)
|
||||
end
|
||||
SYSFX.newRipple(.3,x,y,30)
|
||||
SYSFX.newRipple(3,x,y,30)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -115,30 +115,30 @@ function SYSFX.newAttack(rate,x1,y1,x2,y2,wid,r,g,b,a)
|
||||
r=r,g=g,b=b,a=a,
|
||||
}
|
||||
end
|
||||
function SYSFX.newRipple(duration,x,y,r)
|
||||
function SYSFX.newRipple(rate,x,y,r)
|
||||
fx[#fx+1]={
|
||||
update=FXupdate.ripple,
|
||||
draw=FXdraw.ripple,
|
||||
t=0,
|
||||
rate=1/duration,
|
||||
rate=rate,
|
||||
x=x,y=y,r=r,
|
||||
}
|
||||
end
|
||||
function SYSFX.newRectRipple(duration,x,y,w,h)
|
||||
function SYSFX.newRectRipple(rate,x,y,w,h)
|
||||
fx[#fx+1]={
|
||||
update=FXupdate.rectRipple,
|
||||
draw=FXdraw.rectRipple,
|
||||
t=0,
|
||||
rate=1/duration,
|
||||
rate=rate,
|
||||
x=x,y=y,w=w,h=h,
|
||||
}
|
||||
end
|
||||
function SYSFX.newShade(duration,r,g,b,x,y,w,h)
|
||||
function SYSFX.newShade(rate,r,g,b,x,y,w,h)
|
||||
fx[#fx+1]={
|
||||
update=FXupdate.shade,
|
||||
draw=FXdraw.shade,
|
||||
t=0,
|
||||
rate=1/duration,
|
||||
rate=rate,
|
||||
r=r,g=g,b=b,
|
||||
x=x,y=y,w=w,h=h,
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ end
|
||||
function button:FX()
|
||||
local ATV=self.ATV
|
||||
SYSFX.newRectRipple(
|
||||
.16,
|
||||
6,
|
||||
self.x-ATV,
|
||||
self.y-ATV,
|
||||
self.w+2*ATV,
|
||||
@@ -617,12 +617,12 @@ function selector:press(x)
|
||||
if x<self.x+self.w*.5 then
|
||||
if s>1 then
|
||||
s=s-1
|
||||
SYSFX.newShade(.3,1,1,1,self.x,self.y,self.w*.5,60)
|
||||
SYSFX.newShade(3,1,1,1,self.x,self.y,self.w*.5,60)
|
||||
end
|
||||
else
|
||||
if s<#self.list then
|
||||
s=s+1
|
||||
SYSFX.newShade(.3,1,1,1,self.x+self.w*.5,self.y,self.w*.5,60)
|
||||
SYSFX.newShade(3,1,1,1,self.x+self.w*.5,self.y,self.w*.5,60)
|
||||
end
|
||||
end
|
||||
if self.select~=s then
|
||||
@@ -638,10 +638,10 @@ function selector:arrowKey(isLeft)
|
||||
if isLeft and s==1 or not isLeft and s==#self.list then return end
|
||||
if isLeft then
|
||||
s=s-1
|
||||
SYSFX.newShade(.3,1,1,1,self.x,self.y,self.w*.5,60)
|
||||
SYSFX.newShade(3,1,1,1,self.x,self.y,self.w*.5,60)
|
||||
else
|
||||
s=s+1
|
||||
SYSFX.newShade(.3,1,1,1,self.x+self.w*.5,self.y,self.w*.5,60)
|
||||
SYSFX.newShade(3,1,1,1,self.x+self.w*.5,self.y,self.w*.5,60)
|
||||
end
|
||||
self.code(self.list[s])
|
||||
self.select=s
|
||||
|
||||
Reference in New Issue
Block a user