IEnumerator Transition(string sceneName)
    {
        FadeOutManager fadeOut = FindObjectOfType <FadeOutManager>();

        fadeOut.FadeInSeconds = FadeInSeconds;
        Time.timeScale        = 1;

        fadeOut.FadeOut(false);

        yield return(new WaitForSeconds(LoadDelay));

        UnityEngine.SceneManagement.SceneManager.LoadScene(sceneName);
    }
 public void LoadSleep(float energy)
 {
     fadeScript = FindObjectOfType <FadeOutManager>();
     fadeScript.FadeOut(true, ContinueSleep);
 }