예제 #1
0
        public PageInfo Push(PageID id, object arg, System.Action onClose)
        {
            //  Debug.Log("push: "+id);
            Object     obj  = Resources.Load("Prefabs/GamePage/" + id);
            GameObject go   = Instantiate(obj);
            PageInfo   info = new PageInfo();

            info.go           = go;
            info.name         = id;
            info.arg          = arg;
            info.onPageClosed = onClose;
            info.view         = go.GetComponent <View>();
            mPageStack.Push(info);
            info.view.SetDepth(mPageStack.Count);
            if (arg != null)
            {
                info.view.Refresh(arg);
            }
            else
            {
                info.view.RefreshView();
            }
            if (!UIManager.Instance.IsFront())
            {
                UIManager.Instance.ShowFront(true);
            }
            obj = null;
            return(info);
        }
예제 #2
0
 public PageInfo Push(PageID id, object arg)
 {
     return(Push(id, arg, null));
 }
예제 #3
0
 public PageInfo Push(PageID id)
 {
     return(Push(id, null));
 }
예제 #4
0
 public PageInfo Push(PageID id, System.Action onClose)
 {
     return(Push(id, null, onClose));
 }