sysFX模块改名SYSFX
This commit is contained in:
@@ -11,7 +11,7 @@ LIGHT= require("Zframework/light")
|
||||
BG= require("Zframework/background")
|
||||
WIDGET= require("Zframework/widget")
|
||||
TEXT= require("Zframework/text")
|
||||
sysFX= require("Zframework/sysFX")
|
||||
SYSFX= require("Zframework/sysFX")
|
||||
|
||||
IMG= require("Zframework/image")
|
||||
BGM= require("Zframework/bgm")
|
||||
@@ -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
|
||||
|
||||
@@ -504,7 +504,7 @@ function love.run()
|
||||
TASK.update()
|
||||
VOC.update()
|
||||
BG.update(dt)
|
||||
sysFX.update(dt)
|
||||
SYSFX.update(dt)
|
||||
TEXT.update()
|
||||
_=Tmr[SCN.cur]if _ then _(dt)end--Scene Updater
|
||||
if SCN.swapping then SCN.swapUpdate()end--Scene swapping animation
|
||||
@@ -538,7 +538,7 @@ function love.run()
|
||||
gc.setColor(1,1,1,.5)gc.circle("fill",mx,my,5)
|
||||
gc.setColor(1,1,1)gc.circle("fill",mx,my,3)
|
||||
end
|
||||
sysFX.draw()
|
||||
SYSFX.draw()
|
||||
TEXT.draw()
|
||||
gc.pop()
|
||||
|
||||
|
||||
@@ -79,21 +79,21 @@ function FXdraw.shade(S)
|
||||
gc.rectangle("fill",S.x,S.y,S.w,S.h,2)
|
||||
end
|
||||
|
||||
local sysFX={}
|
||||
function sysFX.update(dt)
|
||||
local SYSFX={}
|
||||
function SYSFX.update(dt)
|
||||
for i=#fx,1,-1 do
|
||||
if fx[i]:update(dt) then
|
||||
rem(fx,i)
|
||||
end
|
||||
end
|
||||
end
|
||||
function sysFX.draw()
|
||||
function SYSFX.draw()
|
||||
for i=1,#fx do
|
||||
fx[i]:draw()
|
||||
end
|
||||
end
|
||||
|
||||
function sysFX.newBadge(x1,y1,x2,y2)
|
||||
function SYSFX.newBadge(x1,y1,x2,y2)
|
||||
fx[#fx+1]={
|
||||
update=FXupdate.badge,
|
||||
draw=FXdraw.badge,
|
||||
@@ -103,7 +103,7 @@ function sysFX.newBadge(x1,y1,x2,y2)
|
||||
x2=x2,y2=y2,
|
||||
}
|
||||
end
|
||||
function sysFX.newAttack(rate,x1,y1,x2,y2,wid,r,g,b,a)
|
||||
function SYSFX.newAttack(rate,x1,y1,x2,y2,wid,r,g,b,a)
|
||||
fx[#fx+1]={
|
||||
update=FXupdate.attack,
|
||||
draw=FXdraw.attack,
|
||||
@@ -115,7 +115,7 @@ 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(duration,x,y,r)
|
||||
fx[#fx+1]={
|
||||
update=FXupdate.ripple,
|
||||
draw=FXdraw.ripple,
|
||||
@@ -124,7 +124,7 @@ function sysFX.newRipple(duration,x,y,r)
|
||||
x=x,y=y,r=r,
|
||||
}
|
||||
end
|
||||
function sysFX.newRectRipple(duration,x,y,w,h)
|
||||
function SYSFX.newRectRipple(duration,x,y,w,h)
|
||||
fx[#fx+1]={
|
||||
update=FXupdate.rectRipple,
|
||||
draw=FXdraw.rectRipple,
|
||||
@@ -133,7 +133,7 @@ function sysFX.newRectRipple(duration,x,y,w,h)
|
||||
x=x,y=y,w=w,h=h,
|
||||
}
|
||||
end
|
||||
function sysFX.newShade(duration,r,g,b,x,y,w,h)
|
||||
function SYSFX.newShade(duration,r,g,b,x,y,w,h)
|
||||
fx[#fx+1]={
|
||||
update=FXupdate.shade,
|
||||
draw=FXdraw.shade,
|
||||
@@ -143,4 +143,4 @@ function sysFX.newShade(duration,r,g,b,x,y,w,h)
|
||||
x=x,y=y,w=w,h=h,
|
||||
}
|
||||
end
|
||||
return sysFX
|
||||
return SYSFX
|
||||
@@ -102,7 +102,7 @@ function button:getCenter()
|
||||
end
|
||||
function button:FX()
|
||||
local ATV=self.ATV
|
||||
sysFX.newRectRipple(
|
||||
SYSFX.newRectRipple(
|
||||
.16,
|
||||
self.x-ATV,
|
||||
self.y-ATV,
|
||||
@@ -605,12 +605,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
|
||||
@@ -626,10 +626,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