Ejemplo n.º 1
0
    static int RemoveAllUIEvent(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.RemoveAllUIEvent(arg0, arg1);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Ejemplo n.º 2
0
        void EndGuide()
        {
            OnCloseGuide();

            m_isStart       = false;
            m_isOperationUI = false;

            if (m_guideWindowBase != null)
            {
                UIManager.CloseUIWindow(m_guideWindowBase);
            }

            m_guideWindowBase = null;

            if (m_isRegister)
            {
                m_isRegister = false;
                InputManager.RemoveAllEventListener <InputUIOnClickEvent>(ReceviceClickEvent);
                UISystemEvent.RemoveAllUIEvent(UIEvent.OnOpen, ReceviceUIOpenEvent);
                UISystemEvent.RemoveAllUIEvent(UIEvent.OnShow, ReceviceUIShowEvent);
                UISystemEvent.RemoveAllUIEvent(UIEvent.OnClose, ReceviceUICloseEvent);

                ApplicationManager.s_OnApplicationUpdate -= Update;
            }
        }
        /// <summary>
        /// 关闭引导逻辑,不调用OnCloseGuide
        /// </summary>
        protected void CloseGuide()
        {
            CloseGuideWindow(m_guideWindowBase);

            m_isStart       = false;
            m_isOperationUI = false;

            m_guideWindowBase = null;

            if (m_isRegister)
            {
                Debug.Log("RemoveAllEventListener");

                m_isRegister = false;
                InputManager.RemoveAllEventListener <InputUIOnClickEvent>(ReceviceClickEvent);
                UISystemEvent.RemoveAllUIEvent(UIEvent.OnOpened, ReceviceUIOpenEvent);
                UISystemEvent.RemoveAllUIEvent(UIEvent.OnShow, ReceviceUIShowEvent);
                UISystemEvent.RemoveAllUIEvent(UIEvent.OnClose, ReceviceUICloseEvent);

                ApplicationManager.s_OnApplicationUpdate -= Update;
            }
        }