统一注释位置
This commit is contained in:
@@ -227,14 +227,15 @@ back.space={
|
||||
S[i+2]=rnd(H)-10 --Y
|
||||
S[i+3]=(rnd()-.5)*.01*s --Vx
|
||||
S[i+4]=(rnd()-.5)*.01*s --Vy
|
||||
end--800 var
|
||||
end
|
||||
end,
|
||||
update=function(dt)
|
||||
local S=stars
|
||||
--Star moving
|
||||
for i=1,1260,5 do
|
||||
S[i+1]=(S[i+1]+S[i+3])%W
|
||||
S[i+2]=(S[i+2]+S[i+4])%H
|
||||
end--Star moving
|
||||
end
|
||||
end,
|
||||
draw=function()
|
||||
gc.clear(.2,.2,.2)
|
||||
@@ -254,13 +255,14 @@ back.space={
|
||||
end,
|
||||
}
|
||||
|
||||
--Make BG vars invisible
|
||||
for _,bg in next,back do
|
||||
if not bg.init then bg.init= NULL end setfenv(bg.init ,BGvars)
|
||||
if not bg.resize then bg.resize= NULL end setfenv(bg.resize ,BGvars)
|
||||
if not bg.update then bg.update= NULL end setfenv(bg.update ,BGvars)
|
||||
if not bg.discard then bg.discard=NULL end setfenv(bg.discard ,BGvars)
|
||||
if not bg.draw then bg.draw= NULL end setfenv(bg.draw ,BGvars)
|
||||
end--Make BG vars invisible
|
||||
end
|
||||
|
||||
BG={
|
||||
cur="none",
|
||||
|
||||
@@ -186,6 +186,7 @@ function Pnt.mode()
|
||||
local sel=cam.sel
|
||||
setFont(30)
|
||||
|
||||
--Draw lines connecting modes
|
||||
gc.setLineWidth(8)
|
||||
gc.setColor(1,1,1,.2)
|
||||
for name,M in next,Modes do
|
||||
@@ -195,7 +196,7 @@ function Pnt.mode()
|
||||
gc.line(M.x,M.y,m.x,m.y)
|
||||
end
|
||||
end
|
||||
end--Lines connecting modes
|
||||
end
|
||||
|
||||
for name,M in next,Modes do
|
||||
if R[name]then
|
||||
@@ -441,6 +442,7 @@ function Pnt.play()
|
||||
for p=1,#players do
|
||||
players[p]:draw()
|
||||
end
|
||||
|
||||
gc.setLineWidth(5)
|
||||
for i=1,#FX_attack do
|
||||
local A=FX_attack[i]
|
||||
@@ -463,9 +465,11 @@ function Pnt.play()
|
||||
gc.rotate(A.t*.1)
|
||||
gc.circle("fill",0,0,A.rad,A.corner)
|
||||
gc.pop()
|
||||
end--FX animation
|
||||
end
|
||||
|
||||
gc.setColor(1,1,1)
|
||||
if setting.VKSwitch then drawVirtualkey()end
|
||||
|
||||
if modeEnv.royaleMode then
|
||||
for i=1,#FX_badge do
|
||||
local b=FX_badge[i]
|
||||
@@ -501,7 +505,7 @@ function Pnt.play()
|
||||
gc.draw(drawableText.modeName,485,10)
|
||||
gc.draw(drawableText.levelName,511+drawableText.modeName:getWidth(),10)
|
||||
|
||||
--Danger
|
||||
--Warning
|
||||
gc.push("transform")
|
||||
gc.origin()
|
||||
if restartCount>0 then
|
||||
@@ -843,6 +847,6 @@ function Pnt.history()
|
||||
gc.rectangle("line",30,45,1000,632)
|
||||
setFont(20)
|
||||
local _=sceneTemp
|
||||
gc.print(_[1][_[2]],40,50)
|
||||
gc.print(_.text[_.pos],40,50)
|
||||
end
|
||||
return Pnt
|
||||
@@ -74,7 +74,7 @@ local TEXT={}
|
||||
function TEXT.clear()
|
||||
texts={}
|
||||
end
|
||||
function TEXT.getText(text,x,y,font,style,spd,stop)
|
||||
function TEXT.getText(text,x,y,font,style,spd,stop)--Another version of TEXT()
|
||||
return{
|
||||
c=0,
|
||||
text=text,
|
||||
@@ -85,7 +85,7 @@ function TEXT.getText(text,x,y,font,style,spd,stop)
|
||||
stop=stop,
|
||||
draw=textFX[style]or assert(false,"unavailable type:"..style),
|
||||
}
|
||||
end--Another version of TEXT()
|
||||
end
|
||||
function TEXT.show(text,x,y,font,style,spd,stop)
|
||||
texts[#texts+1]={
|
||||
c=0, --Timer
|
||||
|
||||
@@ -199,10 +199,12 @@ WIDGET.sel=nil--Selected widget
|
||||
function WIDGET.set(L)
|
||||
WIDGET.sel=nil
|
||||
WIDGET.active=L or{}
|
||||
|
||||
--Reset all widgets
|
||||
if L then
|
||||
for _,W in next,L do
|
||||
W:reset()
|
||||
end--Reset all widgets
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user