GetDisplayTransition() public method

public GetDisplayTransition ( bool force = false ) : U9Transition,
force bool
return U9Transition,
コード例 #1
0
ファイル: U9ViewStack.cs プロジェクト: unit9/swip3
	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
ファイル: U9ViewStack.cs プロジェクト: bigstupidx/swip3
    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
    /// <summary>
    /// Restarts the game.
    /// </summary>
    /// <param name="displayIntro">If set to <c>true</c> display intro.</param>
    void RestartGame(bool displayIntro)
    {
        gameIsOver = false;
        U9Transition t;

        t = U9T.S(U9T.P(displayIntro ? introView.GetDisplayTransition() : null));
        t.Begin();
    }
コード例 #4
0
ファイル: U9ViewStack.cs プロジェクト: bigstupidx/swip3
    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
    void Update()
    {
        if (GameController.Inst.Platform == Platform.Web)
        {
            if (GameController.View.Game == GameController.Inst.ECurrentView)
            {
                _ExitButton.gameObject.SetActive(false);
                _InformationButton.gameObject.SetActive(true);
            }
            else if (_InformationButton.gameObject.activeSelf)
            {
                _ExitButton.gameObject.SetActive(true);
                _InformationButton.gameObject.SetActive(false);
            }
        }
        else
        {
            if (Input.GetKeyDown(KeyCode.Escape) && GameController.View.Quit != GameController.Inst.ECurrentView)
            {
                GameController.Inst.SwitchToView(GameController.View.Quit);
                _QuitView.GetDisplayTransition().Begin();
            }

            if (GameController.View.Info == GameController.Inst.ECurrentView ||
                GameController.View.Intro == GameController.Inst.ECurrentView)
            {
                _Logo.SetActive(false);
                _ExitButton.gameObject.SetActive(true);
                _InformationButton.gameObject.SetActive(false);
                _LeaderboardsButton.gameObject.SetActive(false);
            }
            else if (!(GameController.View.Quit == GameController.Inst.ECurrentView && GameController.View.Info == GameController.Inst.EPrevView))
            {
                _Logo.SetActive(true);
                _ExitButton.gameObject.SetActive(false);
                _InformationButton.gameObject.SetActive(true);
                _LeaderboardsButton.gameObject.SetActive(true);
            }
        }
    }