Inheritance: MonoBehaviour
示例#1
0
	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);
		}
	}
示例#2
0
    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));
        }
    }
示例#3
0
    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);
    }
示例#4
0
    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));
        }
    }
示例#5
0
    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);
    }
示例#6
0
 protected void AddDependentView(U9View v)
 {
     dependentViews.Add(v);
     v.parentView = this;
 }
示例#7
0
文件: U9View.cs 项目: unit9/swip3
	protected void AddDependentView( U9View v ) {
		dependentViews.Add(v);
		v.parentView = this;
	}