Beispiel #1
0
 public virtual void HideWindow()
 {
     if (WindowRoot != null)
     {
         if (WindowRoot.activeSelf)
         {//当前窗口是显示状态
             if (GlobalEnvironment.Singleton.IsInCallbackOrTrigger)
             {
                 DelegateCoroutine.CallStartCoroutine(WindowRoot, HideWindowImpl());
                 return;
             }
             WindowRoot.SetActive(false);
         }
         OnHideWindow();
         if (JoystickMap != null)
         {
             JoystickMap.OnDestroy();
         }
     }
     else
     {
         m_cacheStatus  |= CachedStatus.Visible;
         m_cacheVisiable = false;
     }
 }
Beispiel #2
0
 public static Coroutine CallStartCoroutine(GameObject obj, IEnumerator routine)
 {
     DelegateCoroutine mono = obj.GetComponent<DelegateCoroutine>();
     if (mono == null)
     {
         mono = obj.AddComponent<DelegateCoroutine>();
     }
     if (mono == null)
     {
         return MainGame.Singleton.StartCoroutine(routine);
     }
     return mono.StartCoroutine(routine);
 }
Beispiel #3
0
    public Coroutine StartCoroutine(IEnumerator routine)
    {
        if (WindowRoot == null)
        {
            return(null);
        }
        DelegateCoroutine mono = WindowRoot.GetComponent <DelegateCoroutine>();

        if (mono == null)
        {
            mono = WindowRoot.AddComponent <DelegateCoroutine>();
        }
        return(mono.StartCoroutine(routine));
    }