static int RegisterAllUIEvent(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UIEvent arg0 = (UIEvent)ToLua.CheckObject(L, 1, typeof(UIEvent)); UICallBack arg1 = null; LuaTypes funcType2 = LuaDLL.lua_type(L, 2); if (funcType2 != LuaTypes.LUA_TFUNCTION) { arg1 = (UICallBack)ToLua.CheckObject(L, 2, typeof(UICallBack)); } else { LuaFunction func = ToLua.ToLuaFunction(L, 2); arg1 = DelegateFactory.CreateDelegate(typeof(UICallBack), func) as UICallBack; } UISystemEvent.RegisterAllUIEvent(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
void StartGuide(SingleData guideData) { m_isStart = true; m_startGuideKey = guideData.m_SingleDataKey; Debug.Log(" 启动新手引导 : " + m_startGuideKey); SetCurrent(guideData); m_guideWindowBase = OpenGuideWindow(); OnStart(); GuideLogic(); if (!m_isRegister) { // Debug.Log("StartGuide"); m_isRegister = true; InputManager.AddAllEventListener <InputUIOnClickEvent>(ReceviceClickEvent); UISystemEvent.RegisterAllUIEvent(UIEvent.OnOpened, ReceviceUIOpenEvent); UISystemEvent.RegisterAllUIEvent(UIEvent.OnShow, ReceviceUIShowEvent); UISystemEvent.RegisterAllUIEvent(UIEvent.OnClose, ReceviceUICloseEvent); ApplicationManager.s_OnApplicationUpdate += Update; } }
void StartGuide() { m_isStart = true; m_guideWindowBase = (GuideWindowBase)UIManager.OpenUIWindow(c_guideWindowName); InputManager.AddAllEventListener <InputUIOnClickEvent>(ReceviceClickEvent); UISystemEvent.RegisterAllUIEvent(UIEvent.OnOpen, ReceviceUIOpenEvent); UISystemEvent.RegisterAllUIEvent(UIEvent.OnShow, ReceviceUIShowEvent); UISystemEvent.RegisterAllUIEvent(UIEvent.OnClose, ReceviceUICloseEvent); ApplicationManager.s_OnApplicationUpdate += Update; SetCurrent(LoadFirstGuide()); GuideLogic(); OnStart(); }