整理代码习惯,常量字符串改用单引号,可能有遗漏

This commit is contained in:
MrZ626
2021-04-30 01:00:22 +08:00
parent 7676f32cf2
commit eda6c0d746
213 changed files with 2503 additions and 2499 deletions

View File

@@ -22,9 +22,9 @@ function scene.mouseDown(x,y)
local T=40*math.min(time,45)
if x>230 and x<1050 then
if math.abs(y-800+T)<70 then
loadGame("sprintLock",true)
loadGame('sprintLock',true)
elseif math.abs(y-2160+T)<70 then
loadGame("sprintFix",true)
loadGame('sprintFix',true)
end
end
end
@@ -36,11 +36,11 @@ end
function scene.keyDown(k)
if k=="escape"then
SCN.back()
elseif kb.isDown("s")then
elseif kb.isDown"s"then
if k=="l"then
loadGame("sprintLock",true)
loadGame('sprintLock',true)
elseif k=="f"then
loadGame("sprintFix",true)
loadGame('sprintFix',true)
end
end
end
@@ -77,11 +77,11 @@ function scene.update(dt)
end
function scene.draw()
gc.push("transform")
gc.push('transform')
gc.origin()
for i=1,#names do
local N=names[i]
if type(N.color)=="table"then
if type(N.color)=='table'then
gc.setColor(N.color)
else
gc.setColor(N.color(TIME()+N.w))