GetTransition() public méthode

Returns a reference to the specified transition.
public GetTransition ( UIPanelManager, transition ) : EZTransition
transition UIPanelManager, The enum identifying the transition to retrieve.
Résultat EZTransition
    /// <summary>
    /// Same as BringIn(...), but skips the panel's transition, fast-forwarding
    /// it instantly to its end state.  See the corresponding BringIn() entry for more details.
    /// </summary>
    /// <param name="panel">Reference to the panel to bring up.</param>
    /// <param name="dir">Direction the menu should appear to be moving.
    /// If "Auto" is specified, the direction is determined by comparing
    /// the index of the current panel to the one being brought up.</param>
    public void BringInImmediate(UIPanelBase panel, MENU_DIRECTION dir)
    {
        StartCoroutine("Start");

        UIPanelBase  prevPanel = curPanel;
        EZTransition trans;

        // Get the transition directions:
        if (dir == MENU_DIRECTION.Auto)
        {
            // See if we can determine the direction:
            if (curPanel != null)
            {
                // Forward
                if (curPanel.index <= panel.index)
                {
                    dir = MENU_DIRECTION.Forwards;
                }
                else                 // Backward
                {
                    dir = MENU_DIRECTION.Backwards;
                }
            }
            else             // Assume forward:
            {
                dir = MENU_DIRECTION.Forwards;
            }
        }

        SHOW_MODE dismissMode = ((dir == MENU_DIRECTION.Forwards) ? (SHOW_MODE.DismissForward) : (SHOW_MODE.DismissBack));
        SHOW_MODE bringInMode = ((dir == MENU_DIRECTION.Forwards) ? (SHOW_MODE.BringInForward) : (SHOW_MODE.BringInBack));

        // Do the bring-in:
        BringIn(panel, dir);

        // End the transitions early:
        if (prevPanel != null)
        {
            trans = prevPanel.GetTransition(dismissMode);
            trans.End();
        }
        if (curPanel != null)
        {
            trans = curPanel.GetTransition(bringInMode);
            trans.End();
        }
    }
Exemple #2
0
    /// <summary>
    /// Same as Dismiss(...), but skips the panel's transition, fast-forwarding
    /// it instantly to its end state.  See the corresponding Dismiss() entry for more details.
    /// </summary>
    /// <param name="dir">The direction in which the panel is to be dismissed.</param>
    public void DismissImmediate(MENU_DIRECTION dir)
    {
        if (dir == MENU_DIRECTION.Auto)
        {
            dir = MENU_DIRECTION.Backwards;
        }

        SHOW_MODE mode = ((dir == MENU_DIRECTION.Forwards) ? (SHOW_MODE.DismissForward) : (SHOW_MODE.DismissBack));

        UIPanelBase prevPanel = curPanel;

        Dismiss(dir);

        if (prevPanel != null)
        {
            prevPanel.GetTransition(mode).End();
        }
    }