public void StartOrContinue() { if (PlayerPrefs.HasKey(PlayerPrefKeys.LAST_LEVEL)) { ftb.StartFade(() => UnityEngine.SceneManagement.SceneManager.LoadScene(PlayerPrefs.GetString(PlayerPrefKeys.LAST_LEVEL))); } else { ftb.StartFade(() => UnityEngine.SceneManagement.SceneManager.LoadScene("Level1")); //start } }
public void LoadSelectedLevel() { if (GetComponentInChildren <UnityEngine.UI.Text>()) ///If not locked { FindObjectOfType <SelectMenu>().Disappear(); FindObjectOfType <PauseMenu>().Disappear(); Pause pause = FindObjectOfType <Pause>(); if (pause) { pause.UnPause(); } ftb.StartFade(() => UnityEngine.SceneManagement.SceneManager.LoadScene(gameObject.name)); } }
public void FadeToBlack(float fadeInTime, float fadeOutTime) { _fader.StartFade(fadeOutTime, fadeInTime, Color.black); }