local Interact_Controller = {} local EventSystem = require('Event/EventSystem') local private = {} local curCollectionId = nil function Interact_Controller.OnStartup() EventSystem.Regist(EventID.Interact_DoCollection,Interact_Controller.DoCollection) end function Interact_Controller.DoCollection(collectionId, itemId,index) logging.log(LTAG.LOG , " DoCollection ",curCollectionId,collectionId) if curCollectionId ~= collectionId then UIManager.CloseView(Const_UI_Lua.UIEnum.UICollectView) curCollectionId = collectionId UIManager.RecoverTopView() CTL.HomeMain.CloseOpenView() --从阵容界面进入养成界面,养成界面关闭时不会调用EndUIShowSystem(),导致镜头不对 --StartShowSystem和End应该是成对出现,目前单独调用End没发现问题 --后续可能需要进行优化 CameraController.Instance:EndUIShowSystem() UIManager.OpenView(Const_UI_Lua.UIEnum.UICollectView,{collectionId = collectionId,itemId =itemId,index = index}) end end function Interact_Controller.IsEnterCollection() return UIManager.IsViewOpened(Const_UI_Lua.UIEnum.UICollectView) end function Interact_Controller.SetCurVistedId( id) curCollectionId = id end --- UIInteractView 使用的代码 ↓ function Interact_Controller.TryDoFirstInteract(time) EventSystem.Dispatch(EventID.UI_Interact_ClickFirstInteract) end ------ UIInteractView 使用的代码 ↑ return Interact_Controller