降低所有背景的亮度,优化部分背景性能

This commit is contained in:
MrZ626
2021-05-26 22:14:57 +08:00
parent 34886ca643
commit b07f97097f
33 changed files with 123 additions and 123 deletions

View File

@@ -1,5 +1,8 @@
--Large falling tetrominoes
local gc=love.graphics
local gc_push,gc_pop,gc_clear,gc_origin=gc.push,gc.pop,gc.clear,gc.origin
local gc_setColor,gc_draw=gc.setColor,gc.draw
local rnd=math.random
local ins,rem=table.insert,table.remove
local back={}
@@ -32,22 +35,22 @@ function back.update()
end
end
function back.draw()
gc.clear(.1,.1,.1)
gc.push('transform')
gc.origin()
gc.setColor(1,1,1,.4)
gc_clear(.1,.1,.1)
gc_push('transform')
gc_origin()
gc_setColor(1,1,1,.2)
for i=1,#mino do
local M=mino[i]
local b=M.block
for y=1,#b do
for x=1,#b[1]do
if b[y][x]then
gc.draw(M.texture,M.x+(x-1)*30*M.k,M.y-y*30*M.k,nil,M.k)
gc_draw(M.texture,M.x+(x-1)*30*M.k,M.y-y*30*M.k,nil,M.k)
end
end
end
end
gc.pop()
gc_pop()
end
function back.discard()
mino=nil