更新触摸特效,更换15p轨迹特效
This commit is contained in:
@@ -94,7 +94,7 @@ function love.mousepressed(x,y,k,touch)
|
|||||||
WIDGET.press(mx,my)
|
WIDGET.press(mx,my)
|
||||||
end
|
end
|
||||||
lastX,lastY=mx,my
|
lastX,lastY=mx,my
|
||||||
SYSFX.newRipple(3,mx,my,30)
|
SYSFX.newTap(3,mx,my,30)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function love.mousemoved(x,y,dx,dy,t)
|
function love.mousemoved(x,y,dx,dy,t)
|
||||||
@@ -164,7 +164,7 @@ function love.touchreleased(id,x,y)
|
|||||||
if SCN.touchUp then SCN.touchUp(id,x,y)end
|
if SCN.touchUp then SCN.touchUp(id,x,y)end
|
||||||
if(x-lastX)^2+(y-lastY)^2<26 then
|
if(x-lastX)^2+(y-lastY)^2<26 then
|
||||||
if SCN.touchClick then SCN.touchClick(x,y)end
|
if SCN.touchClick then SCN.touchClick(x,y)end
|
||||||
SYSFX.newRipple(3,x,y,30)
|
SYSFX.newTap(3,x,y,30)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ function FXupdate.badge(S,dt)
|
|||||||
return S.t>=1
|
return S.t>=1
|
||||||
end
|
end
|
||||||
FXupdate.attack=normUpdate
|
FXupdate.attack=normUpdate
|
||||||
|
FXupdate.tap=normUpdate
|
||||||
FXupdate.ripple=normUpdate
|
FXupdate.ripple=normUpdate
|
||||||
FXupdate.rectRipple=normUpdate
|
FXupdate.rectRipple=normUpdate
|
||||||
FXupdate.shade=normUpdate
|
FXupdate.shade=normUpdate
|
||||||
@@ -69,6 +70,16 @@ function FXdraw.attack(S)
|
|||||||
S.y1*(1-t2)+S.y2*t2
|
S.y1*(1-t2)+S.y2*t2
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
function FXdraw.tap(S)
|
||||||
|
local t=S.t
|
||||||
|
setWidth(2)
|
||||||
|
setColor(1,1,1,1-t)
|
||||||
|
gc.circle("line",S.x,S.y,t*(2-t)*30)
|
||||||
|
setColor(1,1,1,(1-t)*.5)
|
||||||
|
gc.circle("fill",S.x,S.y,t*30)
|
||||||
|
setColor(1,1,1,(1-t)*.2)
|
||||||
|
gc.circle("fill",S.x,S.y,(t*(1-t)*2)*30)
|
||||||
|
end
|
||||||
function FXdraw.ripple(S)
|
function FXdraw.ripple(S)
|
||||||
local t=S.t
|
local t=S.t
|
||||||
setWidth(2)
|
setWidth(2)
|
||||||
@@ -130,6 +141,15 @@ function SYSFX.newAttack(rate,x1,y1,x2,y2,wid,r,g,b,a)
|
|||||||
r=r,g=g,b=b,a=a,
|
r=r,g=g,b=b,a=a,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
function SYSFX.newTap(rate,x,y)
|
||||||
|
fx[#fx+1]={
|
||||||
|
update=FXupdate.tap,
|
||||||
|
draw=FXdraw.tap,
|
||||||
|
t=0,
|
||||||
|
rate=rate,
|
||||||
|
x=x,y=y,
|
||||||
|
}
|
||||||
|
end
|
||||||
function SYSFX.newRipple(rate,x,y,r)
|
function SYSFX.newRipple(rate,x,y,r)
|
||||||
fx[#fx+1]={
|
fx[#fx+1]={
|
||||||
update=FXupdate.ripple,
|
update=FXupdate.ripple,
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ local function tapBoard(x,y,key)
|
|||||||
if state<2 then
|
if state<2 then
|
||||||
if not key then
|
if not key then
|
||||||
if pathVis then
|
if pathVis then
|
||||||
SYSFX.newRipple(6,x,y,10)
|
SYSFX.newShade(6,x-5,y-5,11,11,1,1,1)
|
||||||
end
|
end
|
||||||
x,y=int((x-320)/160)+1,int((y-40)/160)+1
|
x,y=int((x-320)/160)+1,int((y-40)/160)+1
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user