void FixedUpdate() { if (_Fader.ScreenHidden && _TransitionInitiated) { _TransitionManager.ChangeScenes(); } }
private IEnumerator ReloadLevelSequence() { DebugMessage("Reloading level..."); _fader.FadeOut(); while (_fader.ScreenShown) { DebugMessage("Fading screen out..."); yield return(0); } _sceneChange.ChangeScenes(); yield return(null); }
private IEnumerator BeginTransition() { if (DebugMode) { Debug.Log("Executing scene transition from Door: " + gameObject.name); Debug.Log("Transitioning to: " + SceneName + " at " + ScenePosition); } _fader.FadeOut(); while (_fader.ScreenShown) { yield return(0); } _sceneChange.PrepareTransition(ScenePosition, Vector3.zero, SceneName); _sceneChange.ChangeScenes(); }
public void OnGUI() { if (!DrawElements) { return; } MainForm.DrawMe(); switch (MainForm.FormResult) { case MainForm.Feedback.Settings: MainForm.SetVisibility(false); SettingsForm.SetVisibility(true); break; case MainForm.Feedback.Instructions: MainForm.SetVisibility(false); InstructionsForm.SetVisibility(true); break; case MainForm.Feedback.Credits: MainForm.SetVisibility(false); CreditsForm.SetVisibility(true); break; case MainForm.Feedback.Support: Application.ExternalEval("window.open('http://www.patreon.com/Asvarduil');"); break; case MainForm.Feedback.NewGame: MainForm.SetVisibility(false); NewGame(); break; case MainForm.Feedback.LoadGame: MainForm.SetVisibility(false); if (_saveFileAccess.LoadGameState()) { if (DebugMode) { Debug.Log("Game state loaded. Transitioning to scene..."); } _transition.ChangeScenes(); } else { if (DebugMode) { Debug.LogWarning("Unable to load game state! Starting a new game."); } NewGame(); } break; default: break; } SettingsForm.DrawMe(); switch (SettingsForm.FormResult) { case SettingsForm.Feedback.Back: SettingsForm.SetVisibility(false); MainForm.SetVisibility(true); break; default: break; } CreditsForm.DrawMe(); switch (CreditsForm.FormResult) { case CreditsForm.Feedback.Back: CreditsForm.SetVisibility(false); MainForm.SetVisibility(true); break; default: break; } InstructionsForm.DrawMe(); switch (InstructionsForm.FormResult) { case InstructionsForm.Feedback.Back: InstructionsForm.SetVisibility(false); MainForm.SetVisibility(true); break; default: break; } }
public void ReloadLevel() { // TODO: Run a coroutine that fades first, then transitions. _transition.ChangeScenes(true); }
private void ReturnToOriginalScene() { _transitionManager.ChangeScenes(true); }