protected virtual void CloseGuideWindow(GuideWindowBase m_guideWindowBase)
 {
     if (m_guideWindowBase != null)
     {
         UIManager.CloseUIWindow(m_guideWindowBase);
     }
 }
        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;
            }
        }
Ejemplo n.º 3
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;
            }
        }
 protected virtual void CloseGuideWindow(GuideWindowBase m_guideWindowBase)
 {
     Debug.Log("guide window =>" + m_guideWindowBase);
     //Debug.Log("==>>" + UIManager.GetUI<GuideWindow>());
     if (m_guideWindowBase != null)
     {
         UIManager.CloseUIWindow(m_guideWindowBase);
     }
     else
     {
         Debug.LogError("Guide Window is null");
     }
 }
Ejemplo n.º 5
0
        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();
        }
        /// <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;
            }
        }