public IEnumerator DemoCameraInternal(TransitionBase transitionBase)
        {
            // make sure these are set in the materials.
            SetColor(_color);
            SetShowTexture(_showTexture);
            SetWipeTexture();

            float transitionTime = TransitionHelper.GetTransitionOutTime(new List <TransitionBase> {
                transitionBase
            });

            transitionBase.InitTransitionOut();
            transitionBase.TransitionOut();
            yield return(new WaitForSeconds(transitionTime + 0.5f));

            transitionBase.TransitionIn();
        }
Example #2
0
    // Closes the screen and transitions out
    public void CloseScreen(UnityAction openScreen)
    {
        if (transition != null)
        {
            if (openScreen != null)
            {
                transition.TransitionOutConfig.OnTransitionComplete.AddListener((TransitionStep transitionStep) => { openScreen(); });
            }

            transition.TransitionOutConfig.OnTransitionComplete.AddListener((TransitionStep transitionStep) => { DestroyScreen(); });
            transition.TransitionOut();
            menuManager.bScreenTransition = true;
        }
        else
        {
            if (openScreen != null)
            {
                openScreen();
            }

            DestroyScreen();
        }
    }