ws模块增加两个计时器用来显示状态,增加alert方法

This commit is contained in:
MrZ626
2021-03-29 01:04:09 +08:00
parent 5d456dda67
commit ccbe7646da
2 changed files with 68 additions and 36 deletions

View File

@@ -511,7 +511,7 @@ function love.run()
if SCN.swapping then SCN.swapUpdate()end--Scene swapping animation
WIDGET.update()--Widgets animation
LOG.update()
WS.update()
WS.update(dt)
--DRAW
if not MINI()then
@@ -598,11 +598,8 @@ function love.run()
gc_setColor(.8,.8,.8)
gc_draw(TEXTURE.ws_running,-20,20*i-20)
end
local lastPongTime=WS.lastPongTime(WSnames[i])
if lastPongTime<1 then
gc_setColor(1,1,1,1-lastPongTime)
gc_rectangle("fill",0,20*i,-20,-20)
end
gc_setColor(1,1,1,WS.getPongTimer(WSnames[i]))gc_rectangle("fill",0,20*i,-20,-20)
gc_setColor(1,0,0,WS.getPongTimer(WSnames[i]))gc_rectangle("fill",-4,20*i-4,-12,-12)
end
gc_pop()