/// <summary> /// 公共方法:得到实例 /// </summary> /// <returns></returns> public static UIMaskMgr GetInstance() { if (_Instance == null) { _Instance = new GameObject("UIMaskMgr").AddComponent <UIMaskMgr>(); } return(_Instance); }
/// <summary> /// 重新显示状态 /// </summary> public virtual void Redisplay() { this.gameObject.SetActive(true); if (_CurrentUIType.UIForms_Type == UIFormType.PopUp) { UIMaskMgr.GetInstance().SetMaskWindow(this.gameObject, _CurrentUIType.UIForm_LucencyType); } }
/// <summary> /// 隐藏状态 /// </summary> public virtual void Hiding() { this.gameObject.SetActive(false); if (_CurrentUIType.UIForms_Type == UIFormType.PopUp) { UIMaskMgr.GetInstance().CancelMaskWindow(); } }
public virtual void ReDisplay() { gameObject.SetActive(true); //设置模态窗体调用必须是弹出窗体 if (_CurrentUIType.UIForms_Type == UIFormType.Popup) { UIMaskMgr.GetInstance().SetMaskWindow(this.gameObject, _CurrentUIType.UIForms_LuccencyType); } }
public virtual void Hiding() { gameObject.SetActive(false); //取消模态窗体调用必须是弹出窗体 if (_CurrentUIType.UIForms_Type == UIFormType.Popup) { UIMaskMgr.GetInstance().CancelMaskWindow(); } }
/// <summary> /// 显示状态 /// </summary> public virtual void Display() { RegistEvent(); ShowTween(); //设置模态窗体调用(必须是弹出窗体) if (_CurrentUIType.UIForms_Type == UIFormType.PopUp) { UIMaskMgr.GetInstance().SetMaskWindow(this.gameObject, _CurrentUIType.UIForm_LucencyType); } }
/// <summary> /// 重新显示状态(因为其他窗口而不显示,当其关闭时,调用该方法) /// </summary> public virtual void Redisplay() { this.gameObject.SetActive(true); //设置模态窗体调用(必须是弹出窗体) if (_CurrentUIType.UIForms_Type == UIFormType.PopUp) { UIMaskMgr.GetInstance().SetMaskWindow(this.gameObject, _CurrentUIType.UIForm_LucencyType); } if (_UpdateView != null) { _UpdateView(false); } }