From dcc887583ffc0dbab0839468d1ff838dc96f4a38 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 6 Dec 2020 15:27:09 +0800 Subject: [PATCH] =?UTF-8?q?SCN.seq=E6=94=B9=E5=90=8DSCN.stack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/scene.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Zframework/scene.lua b/Zframework/scene.lua index 3bcd2e4e..f65ca3d5 100644 --- a/Zframework/scene.lua +++ b/Zframework/scene.lua @@ -14,7 +14,7 @@ local SCN={ time=nil, --Full swap time draw=nil, --Swap draw func }, - seq={"quit","slowFade"},--Back sequence + stack={"quit","slowFade"},--Scene stack scenes=scenes, @@ -80,13 +80,13 @@ function SCN.init(s,org) end function SCN.push(tar,style) if not SCN.swapping then - local m=#SCN.seq - SCN.seq[m+1]=tar or SCN.cur - SCN.seq[m+2]=style or"fade" + local m=#SCN.stack + SCN.stack[m+1]=tar or SCN.cur + SCN.stack[m+2]=style or"fade" end end function SCN.pop() - local _=SCN.seq + local _=SCN.stack _[#_],_[#_-1]=nil end @@ -153,10 +153,10 @@ function SCN.back() if SCN.sceneBack then SCN.sceneBack()end --Poll&Back to previous Scene - local m=#SCN.seq + local m=#SCN.stack if m>0 then - SCN.swapTo(SCN.seq[m-1],SCN.seq[m]) - SCN.seq[m],SCN.seq[m-1]=nil + SCN.swapTo(SCN.stack[m-1],SCN.stack[m]) + SCN.stack[m],SCN.stack[m-1]=nil end end return SCN \ No newline at end of file