public U9Transition GetPushViewTransition (U9View newView, bool hideOldView = true, bool force = false, bool hideAfter = false ) { U9View oldView = null; if (viewStack.Count > 0) { oldView = viewStack.Peek (); } viewStack.Push (newView); U9Transition hideOldViewTransition = null, displayNewViewTransition = null; if (oldView) { oldView.DisableInteraction (); if (hideOldView) { hideOldViewTransition = oldView.GetHideTransition (force); } } displayNewViewTransition = newView.GetDisplayTransition (force); if (hideAfter) { return U9T.S (displayNewViewTransition,hideOldViewTransition); } else { return U9T.S (hideOldViewTransition, displayNewViewTransition); } }
public U9Transition GetPushViewTransition(U9View newView, bool hideOldView = true, bool force = false, bool hideAfter = false) { U9View oldView = null; if (viewStack.Count > 0) { oldView = viewStack.Peek(); } viewStack.Push(newView); U9Transition hideOldViewTransition = null, displayNewViewTransition = null; if (oldView) { oldView.DisableInteraction(); if (hideOldView) { hideOldViewTransition = oldView.GetHideTransition(force); } } displayNewViewTransition = newView.GetDisplayTransition(force); if (hideAfter) { return(U9T.S(displayNewViewTransition, hideOldViewTransition)); } else { return(U9T.S(hideOldViewTransition, displayNewViewTransition)); } }
List <GameObject> FindDependentGameObjects(Transform parent) { List <GameObject> foundGameObjects = new List <GameObject>(); foundGameObjects.Add(parent.gameObject); foreach (Transform t in parent) { U9View view = t.GetComponent <U9View>(); if (!view) { foundGameObjects.Add(t.gameObject); foundGameObjects.AddRange(FindDependentGameObjects(t)); } } return(foundGameObjects); }
public U9Transition GetPopViewTransition(int popCount = 1, bool force = false, bool displayFirst = false) { //PrintStack(); List <U9Transition> popTransitions = new List <U9Transition>(); while (viewStack.Count > 0 && popCount > 0) { popTransitions.Add(viewStack.Pop().GetHideTransition(force)); popCount--; } U9View newView = null; if (viewStack.Count > 0) { newView = viewStack.Peek(); } U9Transition displayNewView = null; if (newView) { if (!newView.IsDisplaying) { displayNewView = newView.GetDisplayTransition(force); } else { newView.EnableInteraction(); } } //PrintStack(); if (displayFirst) { return(U9T.S(displayNewView, U9T.S(popTransitions.ToArray()))); } else { return(U9T.S(U9T.S(popTransitions.ToArray()), displayNewView)); } }
List <U9View> FindDependentViews(Transform parent) { List <U9View> foundViews = new List <U9View>(); foreach (Transform t in parent) { U9View view = t.GetComponent <U9View>(); if (view) { foundViews.Add(view); } else { foundViews.AddRange(FindDependentViews(t)); } } return(foundViews); }
protected void AddDependentView(U9View v) { dependentViews.Add(v); v.parentView = this; }
protected void AddDependentView( U9View v ) { dependentViews.Add(v); v.parentView = this; }