再次修正之前整理小程序代码把FONT.set打成FONT.get close #312

This commit is contained in:
MrZ626
2021-09-21 22:49:08 +08:00
parent b762741a6e
commit f1068eacd8
7 changed files with 13 additions and 13 deletions

View File

@@ -258,7 +258,7 @@ local backColor={
},--Black },--Black
} }
function scene.draw() function scene.draw()
FONT.get(40) FONT.set(40)
gc.setColor(COLOR.Z) gc.setColor(COLOR.Z)
gc.print(("%.3f"):format(time),1026,80) gc.print(("%.3f"):format(time),1026,80)
gc.setColor(1,.8,.8) gc.setColor(1,.8,.8)
@@ -282,7 +282,7 @@ function scene.draw()
gc.setLineWidth(4) gc.setLineWidth(4)
local mono=invis and state==1 local mono=invis and state==1
FONT.get(80) FONT.set(80)
for i=1,4 do for i=1,4 do
for j=1,4 do for j=1,4 do
if cx~=j or cy~=i then if cx~=j or cy~=i then

View File

@@ -82,7 +82,7 @@ function scene.update()
end end
function scene.draw() function scene.draw()
FONT.get(40) FONT.set(40)
gc.setColor(COLOR.Z) gc.setColor(COLOR.Z)
gc.print(("%.3f"):format(time),1026,80) gc.print(("%.3f"):format(time),1026,80)
gc.print(mistake,1026,150) gc.print(mistake,1026,150)
@@ -99,7 +99,7 @@ function scene.draw()
gc.setColor(.2,.8,.2)--ready gc.setColor(.2,.8,.2)--ready
end end
FONT.get(100) FONT.set(100)
GC.mStr(state==1 and #targetString-progress+1 or state==0 and"Ready"or state==2 and"Win",640,200) GC.mStr(state==1 and #targetString-progress+1 or state==0 and"Ready"or state==2 and"Win",640,200)
gc.setColor(COLOR.Z) gc.setColor(COLOR.Z)
@@ -107,7 +107,7 @@ function scene.draw()
gc.print(targetString:sub(progress+1),310,380) gc.print(targetString:sub(progress+1),310,380)
gc.setColor(1,1,1,.7) gc.setColor(1,1,1,.7)
FONT.get(40) FONT.set(40)
gc.print(targetString,120,520) gc.print(targetString,120,520)
end end

View File

@@ -171,7 +171,7 @@ function scene.draw()
if gameover then if gameover then
--Draw result --Draw result
FONT.get(60) FONT.set(60)
if gameover==0 then if gameover==0 then
gc.setColor(1,.6,.6) gc.setColor(1,.6,.6)
mStr("RED\nWON",1140,200) mStr("RED\nWON",1140,200)

View File

@@ -189,15 +189,15 @@ function scene.update(dt)
end end
end end
function scene.draw() function scene.draw()
FONT.get(35) FONT.set(35)
gc.setColor(COLOR.Z) gc.setColor(COLOR.Z)
GC.mStr("["..level.."]",640,30) GC.mStr("["..level.."]",640,30)
FONT.get(100) FONT.set(100)
if type(question)=='table'then gc.setColor(1,1,1)end if type(question)=='table'then gc.setColor(1,1,1)end
GC.mStr(question,640,60) GC.mStr(question,640,60)
FONT.get(80) FONT.set(80)
gc.setColor(1,1,1,inputTime) gc.setColor(1,1,1,inputTime)
GC.mStr(input,640,160) GC.mStr(input,640,160)
end end

View File

@@ -114,10 +114,10 @@ function scene.draw()
gc.setColor(COLOR.Z) gc.setColor(COLOR.Z)
gc.setLineWidth(2) gc.setLineWidth(2)
gc.rectangle('line',100,80,650,150,5) gc.rectangle('line',100,80,650,150,5)
FONT.get(45) FONT.set(45)
if reg then gc.printf(reg,0,100,720,'right')end if reg then gc.printf(reg,0,100,720,'right')end
if val then gc.printf(val,0,150,720,'right')end if val then gc.printf(val,0,150,720,'right')end
if sym then FONT.get(50)gc.print(sym,126,150)end if sym then FONT.set(50)gc.print(sym,126,150)end
end end
scene.widgetList={ scene.widgetList={

View File

@@ -103,7 +103,7 @@ function scene.draw()
end end
--Info --Info
FONT.get(40) FONT.set(40)
if combo>1 then if combo>1 then
gc.setColor(1,1,.6) gc.setColor(1,1,.6)
gc.print("x"..combo,300,80) gc.print("x"..combo,300,80)

View File

@@ -152,7 +152,7 @@ end
function scene.draw() function scene.draw()
--Draw score --Draw score
gc.setColor(.4,.4,.4) gc.setColor(.4,.4,.4)
FONT.get(100) FONT.set(100)
GC.mStr(p1.score,470,20) GC.mStr(p1.score,470,20)
GC.mStr(p2.score,810,20) GC.mStr(p2.score,810,20)