From 79368af6eeae2eefe5c5d46e8e22d1661e086113 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Tue, 17 Aug 2021 23:57:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DMES=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=BC=B9=E5=87=BA=E6=B6=88=E6=81=AF=E6=97=B6=E5=8D=A1=E9=A1=BF?= =?UTF-8?q?=E4=BC=9A=E5=AF=BC=E8=87=B4=E6=B6=88=E6=81=AF=E6=B5=AE=E7=A9=BA?= =?UTF-8?q?=20close=20#182?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/message.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Zframework/message.lua b/Zframework/message.lua index 37c3375c..8fb638dc 100644 --- a/Zframework/message.lua +++ b/Zframework/message.lua @@ -3,6 +3,7 @@ local gc_push,gc_pop=gc.push,gc.pop local gc_translate,gc_setColor,gc_draw=gc.translate,gc.setColor,gc.draw local ins,rem=table.insert,table.remove +local max=math.max local mesList={} local mesIcon={ @@ -102,9 +103,9 @@ function MES.update(dt) for i=#mesList,1,-1 do local m=mesList[i] if m.startTime>0 then - m.startTime=m.startTime-dt + m.startTime=max(m.startTime-dt,0) elseif m.time>0 then - m.time=m.time-dt + m.time=max(m.time-dt,0) elseif m.endTime>0 then m.endTime=m.endTime-dt else