Beispiel #1
0
    public void Pop()
    {
        if (_ins.m_uistacks.Count == 0)
        {
            m_bgMask.Hide();
            return;
        }
        int    uiid = _ins.m_uistacks.Pop();
        UIBase ub   = _ins.m_uicache[uiid];

        kernel.StartCoroutine(ub.DoTween(false, uiid, DoTweenOnPop));
    }
Beispiel #2
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();
    }