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); }
public PageInfo Push(PageID id, object arg) { return(Push(id, arg, null)); }
public PageInfo Push(PageID id) { return(Push(id, null)); }
public PageInfo Push(PageID id, System.Action onClose) { return(Push(id, null, onClose)); }