AddTempTransitionDelegate() public method

Temporarily adds a delegate to be called when the next transition completes. This will be unset after it is called.
public AddTempTransitionDelegate ( TransitionCompleteDelegate del ) : void
del TransitionCompleteDelegate Delegate to be called.
return void
    // Starts a panel transitioning and tracks it
    protected void StartAndTrack(UIPanelBase p, SHOW_MODE mode)
    {
        p.StartTransition(mode);

        // See if it didn't quit immediately:
        if (p.IsTransitioning)
        {
            p.AddTempTransitionDelegate(DecrementTransitioningPanels);
            ++transitioningPanelCount;
        }
    }
Example #2
0
    public override void OnInput(ref POINTER_INFO ptr)
    {
        if (deleted)
        {
            return;
        }

        base.OnInput(ref ptr);

        if (!m_controlIsEnabled || IsHidden())
        {
            return;
        }

        if (ptr.evt == whenToInvoke)
        {
            if (loadingPanel != null)
            {
                UIPanelManager mgr = (UIPanelManager)loadingPanel.Container;

                // Let us know when the panel is finished coming in:
                loadingPanel.AddTempTransitionDelegate(LoadSceneDelegate);

                if (mgr is UIPanelManager && mgr != null)
                {
                    mgr.BringIn(loadingPanel);
                }
                else
                {
                    loadingPanel.StartTransition(UIPanelManager.SHOW_MODE.BringInForward);
                }
            }
            else
            {
                Invoke("DoLoadScene", delay);
            }
        }
    }
	// Starts a panel transitioning and tracks it
	protected void StartAndTrack(UIPanelBase p, SHOW_MODE mode)
	{
		p.StartTransition(mode);

		// See if it didn't quit immediately:
		if (p.IsTransitioning)
		{
			p.AddTempTransitionDelegate(DecrementTransitioningPanels);
			++transitioningPanelCount;
		}
	}