缓冲槽内有过多垃圾行时满了就不会再继续绘制,减少极端情况下的卡顿

This commit is contained in:
MrZ_26
2022-11-03 22:46:46 +08:00
parent 89a5a718da
commit 9e61cb995a

View File

@@ -383,8 +383,8 @@ local function _drawBuffer(atkBuffer,bufferWarn,atkBufferSum1,atkBufferSum)
local bar=A.amount*30
if h+bar>600 then bar=600-h end
if not A.sent then
-- Appear
if A.time<20 then
-- Appear
bar=bar*(20*A.time)^.5*.05
end
if A.countdown>0 then
@@ -405,12 +405,13 @@ local function _drawBuffer(atkBuffer,bufferWarn,atkBufferSum1,atkBufferSum)
gc_rectangle('fill',303,600-h-bar,11,bar,2)
end
else
-- Disappear
gc_setColor(attackColor[A.lv][1])
bar=bar*(20-A.time)*.05
gc_rectangle('fill',303,600-h-bar,11,bar,2)
-- Disappear
end
h=h+bar
if h>=600 then break end
end
if bufferWarn then
local sum=atkBufferSum1