Esempio n. 1
0
 public UIType(UnityEngine.Color maskColor)
 {
     this.layerIndex = 0;
     this.form       = UIFormType.Fixed;
     this.hideAlaph  = 0;
     this.layer      = UILayerType.Base;
     this.enterAnim  = null;
     this.quitAnim   = null;
     this.closeRule  = CloseRule.DestroyNoraml;
     this.hideRule   = HideRule.HideGameObject;
     this.cover      = UIMask.None;
     this.maskColor  = maskColor;
 }
Esempio n. 2
0
    public void MaskFull()
    {
        GameObject tmpGameObj = Resources.Load <GameObject>("Prefab/UGUI/UI/MaskFull");

        tmpGameObj = GameObject.Instantiate(tmpGameObj);
        UIMask uimask = tmpGameObj.GetComponent <UIMask>();

        if (uimask == null)
        {
            tmpGameObj.AddComponent <UIMask>();
        }
        tmpGameObj.transform.SetParent(mainCanvas.transform, false);
        tmpGameObj.transform.SetAsLastSibling();
    }
Esempio n. 3
0
    protected override void Init()
    {
        kernel = GameKernel.GetInstance();

        m_uistacks   = new Stack <int>();
        m_uicache    = new UIBase[(int)UIPageEnum.Max];
        m_tips_cache = new List <int>();
        sb           = new StringBuilder(256);

        //生成uiroot
        GameObject temp = ResMgr.LoadGameObject(string.Format(m_UIPath, m_root_tag));

        //Debug.Log(string.Format(m_UIPath, m_root_tag));
        m_uiRoot = temp.GetComponentInChildren <UIBase>();
        m_canvas = m_uiRoot.GetComponent <Canvas>();

        //Debug.Log("init the muiRoot");
        GameObject.DontDestroyOnLoad(temp);
        //生成背景遮罩
        temp     = ResMgr.LoadGameObject(string.Format(m_UIPath, m_mask_tag), m_uiRoot.transform);
        m_bgMask = temp.GetComponent <UIMask>();
        m_bgMask.Hide();
    }
Esempio n. 4
0
 public UIMask()
 {
     instance = this;
 }
Esempio n. 5
0
 void Awake()
 {
     _material = this.renderer.material;
     _mask     = GetComponentInParent <UIMask>();
 }