示例#1
0
 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
     }
 }
示例#2
0
 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));
     }
 }
示例#3
0
 public void FadeToBlack(float fadeInTime, float fadeOutTime)
 {
     _fader.StartFade(fadeOutTime, fadeInTime, Color.black);
 }