touching变量移入SCN模块

修复iOS上经常卡掉第一个触摸导致后续不能和控件交互
This commit is contained in:
MrZ626
2021-10-18 23:45:03 +08:00
parent ed2b07d5cf
commit 013765d5d2
2 changed files with 6 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ local abs=math.abs
local scenes={}
local SCN={
mainTouchID=nil, --First touching ID(userdata)
cur='NULL', --Current scene name
swapping=false, --If Swapping
stat={
@@ -52,6 +53,7 @@ function SCN.swapUpdate(dt)
if S.time<S.changeTime and S.time+dt>=S.changeTime then
--Scene swapped this frame
SCN.init(S.tar,SCN.cur)
SCN.mainTouchID=nil
end
if S.time<0 then
SCN.swapping=false