升级SCR模块,整理大量坐标系变换代码

This commit is contained in:
MrZ626
2021-05-30 02:23:08 +08:00
parent 51d2f43229
commit 9e61505205
20 changed files with 131 additions and 156 deletions

View File

@@ -77,8 +77,7 @@ function scene.update(dt)
end
function scene.draw()
gc.push('transform')
gc.origin()
gc.replaceTransform(SCR.origin)
for i=1,#names do
local N=names[i]
if type(N.color)=='table'then
@@ -88,7 +87,7 @@ function scene.draw()
end
gc.draw(N.text,N.x,N.y)
end
gc.pop()
gc.replaceTransform(SCR.xOy)
gc.setColor(1,1,1)
local T=40*math.min(time,45)