public void Call() { PlaytimeData.Reset(); ScreenTransition screenTransition = ScreenTransition.instance; if (screenTransition) { screenTransition.Call(scenePath); } else { ScreenTransition.LoadScene(scenePath); } }
private void Update() { if (Input.GetKeyDown(KeyCode.Alpha3)) { string sceneName = "DevScene"; ScreenTransition screenTransition = ScreenTransition.instance; if (screenTransition) { screenTransition.Call(sceneName); } else { ScreenTransition.LoadScene(sceneName); } } }
public void RestartScene() { PlaytimeData.numberOfDeaths++; PlayerHealth.ResetSavedHealth(); ScreenTransition screenTransition = ScreenTransition.instance; string sceneName = SceneManager.GetActiveScene().path; if (screenTransition) { screenTransition.Call(sceneName); } else { ScreenTransition.LoadScene(sceneName); } }
public void CallNextStage() { UpdateData(); ScreenTransition screenTransition = ScreenTransition.instance; string scenePath = SceneManager.GetActiveScene().path; int currentIndex = int.Parse(scenePath.Substring(scenePath.Length - 7, 1)); scenePath = scenePath.Substring(0, scenePath.Length - 7) + (currentIndex + 1) + ".unity"; if (screenTransition) { screenTransition.Call(scenePath); } else { ScreenTransition.LoadScene(scenePath); } }
private IEnumerator WinSequence() { yield return(new WaitForSeconds(.5f)); WinScreen winScreen = WinScreen.instance; if (winScreen) { winScreen.Show(); } yield return(new WaitForSeconds(2)); ScreenTransition screenTransition = ScreenTransition.instance; string scenePath = scenePath = "Assets/Scenes/WorldsScene.unity"; if (screenTransition) { screenTransition.Call(scenePath); } else { ScreenTransition.LoadScene(scenePath); } }