整理代码,大规模整理(展开)使用次数不多的局部变量名
框架跟进
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
local gc=love.graphics
|
||||
|
||||
local scene={}
|
||||
|
||||
local verName=("%s %s %s"):format(SYSTEM,VERSION.string,VERSION.name)
|
||||
local tipLength=760
|
||||
local tip=gc.newText(getFont(30),"")
|
||||
local tip=GC.newText(getFont(30),"")
|
||||
local scrollX--Tip scroll position
|
||||
|
||||
local widgetX0={
|
||||
@@ -142,30 +140,30 @@ function scene.update(dt)
|
||||
end
|
||||
|
||||
local function _tipStencil()
|
||||
gc.rectangle('fill',0,0,tipLength,42)
|
||||
GC.rectangle('fill',0,0,tipLength,42)
|
||||
end
|
||||
function scene.draw()
|
||||
--Version
|
||||
setFont(20)
|
||||
gc.setColor(.6,.6,.6)
|
||||
mStr(verName,640,110)
|
||||
GC.setColor(.6,.6,.6)
|
||||
GC.mStr(verName,640,110)
|
||||
|
||||
--Title
|
||||
gc.setColor(1,1,1)
|
||||
GC.setColor(1,1,1)
|
||||
mDraw(TEXTURE.title_color,640,60,nil,.43)
|
||||
|
||||
--Tip
|
||||
gc.setColor(COLOR.Z)
|
||||
gc.push('transform')
|
||||
gc.translate(260,650)
|
||||
gc.setLineWidth(2)
|
||||
gc.rectangle('line',0,0,tipLength,42,3)
|
||||
gc.stencil(_tipStencil)
|
||||
gc.setStencilTest('equal',1)
|
||||
gc.draw(tip,0+scrollX,0)
|
||||
gc.setColor(1,1,1,.2)
|
||||
gc.setStencilTest()
|
||||
gc.pop()
|
||||
GC.setColor(COLOR.Z)
|
||||
GC.push('transform')
|
||||
GC.translate(260,650)
|
||||
GC.setLineWidth(2)
|
||||
GC.rectangle('line',0,0,tipLength,42,3)
|
||||
GC.stencil(_tipStencil)
|
||||
GC.setStencilTest('equal',1)
|
||||
GC.draw(tip,0+scrollX,0)
|
||||
GC.setColor(1,1,1,.2)
|
||||
GC.setStencilTest()
|
||||
GC.pop()
|
||||
|
||||
--Player
|
||||
PLAYERS[1]:draw()
|
||||
@@ -178,10 +176,10 @@ function scene.draw()
|
||||
|
||||
--Connecting mark
|
||||
if NET.getlock('access_and_login')then
|
||||
gc.setColor(COLOR.Z)
|
||||
gc.setLineWidth(10)
|
||||
GC.setColor(COLOR.Z)
|
||||
GC.setLineWidth(10)
|
||||
local t=TIME()*6.26%6.2832
|
||||
gc.arc('line','open',scene.widgetList[3].x+865,450,40,t,t+4.26)
|
||||
GC.arc('line','open',scene.widgetList[3].x+865,450,40,t,t+4.26)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user