void FadeOutTransition() { transitionmanagerInstance.EnableFadeOut(); switch (changeDestination) { case DestinationChangeType.CHANGESCENE: if (transitionDisplay == TransitionDisplayType.ADJUSTABLETEXT) { transitionmanagerInstance.FadeOut(transitionTime, fadeOutTime, dateText, depthText, sceneName); } else { transitionmanagerInstance.FadeOut(transitionTime, fadeOutTime, transitionImage, sceneName); } break; case DestinationChangeType.TELEPORT: if (transitionDisplay == TransitionDisplayType.ADJUSTABLETEXT) { transitionmanagerInstance.FadeOut(transitionTime, fadeOutTime, dateText, depthText, destination); } else { transitionmanagerInstance.FadeOut(transitionTime, fadeOutTime, transitionImage, destination); } break; } }
void OnButtonClick() { if (!LoadingNextScene) { LoadingNextScene = true; TransitionManager.FadeOut(FadeOutDuration, FadeOutColor, delegate { SceneManager.LoadScene(DestinationSceneName); LoadingNextScene = false; }); } }