Example #1
0
 /// <summary>
 /// 显示状态
 /// </summary>
 public virtual void Display()
 {
     this.gameObject.SetActive(true);
     //设置UI遮罩
     if (GetUIType() == UIFormType.PopUp)
     {
         UIMaskManager.GetInstance().SetMaskWindow(this, CurrentUIType.UIForm_Luceny);
     }
     if (m_btnClose != null && OnCloseAction == null)
     {
         m_btnClose.onClick.AddListener(OnCloseTodo);
     }
     if (m_btnClose != null && OnCloseAction != null)
     {
         m_btnClose.onClick.AddListener(OnCloseAction);
     }
 }
Example #2
0
 /// <summary>
 /// 隐藏状态
 /// </summary>
 public virtual void Hiding()
 {
     //取消UI遮罩
     if (GetUIType() == UIFormType.PopUp)
     {
         UIMaskManager.GetInstance().CancelMaskWindow(this);
     }
     if (m_btnClose != null && OnCloseAction == null)
     {
         m_btnClose.onClick.RemoveListener(OnCloseTodo);
     }
     if (m_btnClose != null && OnCloseAction != null)
     {
         m_btnClose.onClick.RemoveListener(OnCloseAction);
     }
     //删除自身
     GameObject.Destroy(this.gameObject);
 }