Esempio n. 1
0
 public void CloseUI() //调用这里就直接关了,要传参数的话,传完了再调用
 {
     //告诉遮罩管理器,如果有遮罩的话
     if (mUseMask)
     {
         mGateway.UIKit_MaskMgr.RemoveMask(this);
     }
     //告诉层级管理器
     mGateway.UIKit_LayerMgr.OnUIClose(this);
     //手起刀落
     GameObject.Destroy(mUIEntity.gameObject);
     //通知资源管理器,可以回收了
     VFSMgr.I.RemoveUse(mUIPath);
     //打扫
     mUIEntity     = null;
     mUIPrefab     = null;
     mGateway      = null;
     mUIGameObject = null;
     mUICanvas     = null;
 }
Esempio n. 2
0
        /// <summary>
        /// 初始化
        /// </summary>
        public UIMaskMgr(Transform TransUIRoot, Color maskColor, XUIMgrGateway _gateway)
        {
            mGateway   = _gateway;
            MaskGo     = TransUIRoot.gameObject.FindOrCreateGo("UIMask");
            MaskCanvas = MaskGo.GetComponentOrAdd <Canvas>();
            MaskCanvas.overrideSorting = true;
            MaskCanvas.sortingOrder    = 0;


            var mask_gr = MaskGo.GetComponentOrAdd <GraphicRaycaster>();

            mask_gr.ignoreReversedGraphics = true;

            var rect_mask_trans = MaskGo.GetComponent <RectTransform>();

            rect_mask_trans.anchorMin          = Vector2.zero;
            rect_mask_trans.anchorMax          = Vector2.one;
            rect_mask_trans.anchoredPosition3D = Vector3.zero;
            rect_mask_trans.localScale         = Vector3.one;
            rect_mask_trans.sizeDelta          = Vector2.zero;

            var go_img_mask = MaskGo.FindOrCreateGo("Mask");
            var img_mask    = go_img_mask.GetComponentOrAdd <XImage>();

            img_mask.color = maskColor;

            var rect_img = go_img_mask.GetComponent <RectTransform>();

            rect_img.anchorMin          = Vector2.zero;
            rect_img.anchorMax          = Vector2.one;
            rect_img.anchoredPosition3D = Vector3.zero;
            rect_img.localScale         = Vector3.one;
            rect_img.sizeDelta          = Vector2.zero;

            go_img_mask.GetComponentOrAdd <Button>().onClick.AddListener(OnMaskClicked);


            MaskGo.SetLayerRecursive(5);
            MaskGo.Hide();
        }
Esempio n. 3
0
 public UIItem(GameObject _prefab, string _ui_path, XUIMgrGateway _gatewayMgr)
 {
     mUIPrefab = _prefab;
     mUIPath   = _ui_path;
     mGateway  = _gatewayMgr;
 }
Esempio n. 4
0
 public UILayerMgr(XUIMgrGateway _gateway)
 {
     mGateway = _gateway;
 }
Esempio n. 5
0
 public XUIManagerAdv(XUIMgrGateway _Gateway, IVFS _vfs)
 {
     mVFS     = _vfs;
     mGateway = _Gateway;
 }
Esempio n. 6
0
 public XUIManagerAdv(XUIMgrGateway _Gateway)
 {
     mGateway = _Gateway;
 }
Esempio n. 7
0
 public XUIManager(XUIMgrGateway _Gateway, IVFS _vfs)
 {
     mGateway = _Gateway;
     mVFS     = _vfs;
 }