예제 #1
0
        public IEnumerator onScreenObscured(TransitionEngine transitionKit)
        {
            transitionKit.transitionKitCamera.clearFlags = CameraClearFlags.Nothing;
            transitionKit.material.color = fadeToColor;

            if (nextScene >= 0)
            {
                SceneManager.LoadSceneAsync(nextScene);
            }

            yield return(transitionKit.StartCoroutine(transitionKit.tickProgressPropertyInMaterial(duration)));

            transitionKit.makeTextureTransparent();

            if (fadedDelay > 0)
            {
                yield return(new WaitForSeconds(fadedDelay));
            }

            // we dont transition back to the new scene unless it is loaded
            if (nextScene >= 0)
            {
                yield return(transitionKit.StartCoroutine(transitionKit.waitForLevelToLoad(nextScene)));
            }

            yield return(transitionKit.StartCoroutine(transitionKit.tickProgressPropertyInMaterial(duration, true)));
        }
예제 #2
0
        public IEnumerator onScreenObscured(TransitionEngine transitionKit)
        {
            transitionKit.transitionKitCamera.clearFlags = CameraClearFlags.Nothing;

            // set some material properties
            transitionKit.material.SetFloat("_Size", size);
            transitionKit.material.SetFloat("_WindVerticalSegments", windVerticalSegments);

            // we dont transition back to the new scene unless it is loaded
            if (nextScene >= 0)
            {
                SceneManager.LoadSceneAsync(nextScene);
                yield return(transitionKit.StartCoroutine(transitionKit.waitForLevelToLoad(nextScene)));
            }

            yield return(transitionKit.StartCoroutine(transitionKit.tickProgressPropertyInMaterial(duration)));
        }