Exemplo n.º 1
0
    public IEnumerator TimeTravelWithFade(TransitionController transitionController)
    {
        if (!isActiveAndEnabled)
        {
            yield break;
        }

        if (_isTransitioning)
        {
            yield break;
        }

        _isTransitioning = true;

        Timeswaps++;
        yield return(StartCoroutine(transitionController.FadeOutToBlack()));

        yield return(StartCoroutine(UpdateTimeTravelState(!IsInPast)));

        yield return(StartCoroutine(transitionController.FadeInFromBlack()));

        _isTransitioning = false;
    }