整理代码,大规模整理(展开)使用次数不多的局部变量名
框架跟进
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
|
||||
local BGcolor
|
||||
local sysAndScn,errorText
|
||||
local errorShot,errorInfo
|
||||
@@ -8,7 +5,7 @@ local errorShot,errorInfo
|
||||
local scene={}
|
||||
|
||||
function scene.sceneInit()
|
||||
BGcolor=rnd()>.026 and{.3,.5,.9}or{.62,.3,.926}
|
||||
BGcolor=math.random()>.026 and{.3,.5,.9}or{.62,.3,.926}
|
||||
sysAndScn=SYSTEM.."-"..VERSION.string.." scene:"..Z.getErr('#').scene
|
||||
errorText=LOADED and text.errorMsg or"An error has occurred while the game was loading.\nAn error log has been created so you can send it to the author."
|
||||
errorShot,errorInfo=Z.getErr('#').shot,Z.getErr('#').mes
|
||||
@@ -22,19 +19,19 @@ function scene.sceneInit()
|
||||
end
|
||||
|
||||
function scene.draw()
|
||||
gc.clear(BGcolor)
|
||||
gc.setColor(1,1,1)
|
||||
gc.draw(errorShot,100,326,nil,512/errorShot:getWidth(),288/errorShot:getHeight())
|
||||
gc.setColor(COLOR.Z)
|
||||
setFont(100)gc.print(":(",100,0,0,1.2)
|
||||
setFont(40)gc.printf(errorText,100,160,SCR.w0-100)
|
||||
GC.clear(BGcolor)
|
||||
GC.setColor(1,1,1)
|
||||
GC.draw(errorShot,100,326,nil,512/errorShot:getWidth(),288/errorShot:getHeight())
|
||||
GC.setColor(COLOR.Z)
|
||||
setFont(100)GC.print(":(",100,0,0,1.2)
|
||||
setFont(40)GC.printf(errorText,100,160,SCR.w0-100)
|
||||
setFont(20,'mono')
|
||||
gc.print(sysAndScn,100,630)
|
||||
GC.print(sysAndScn,100,630)
|
||||
setFont(15,'mono')
|
||||
gc.printf(errorInfo[1],626,326,1260-626)
|
||||
gc.print("TRACEBACK",626,390)
|
||||
GC.printf(errorInfo[1],626,326,1260-626)
|
||||
GC.print("TRACEBACK",626,390)
|
||||
for i=4,#errorInfo do
|
||||
gc.print(errorInfo[i],626,340+20*i)
|
||||
GC.print(errorInfo[i],626,340+20*i)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user