Beispiel #1
0
 public void MainMenuButton()
 {
     PlayClickSound();
     loadingScreen.ShowLoading();
     if (OnMenuPress != null)
     {
         StartCoroutine(SceneLoadDelay(OnMenuPress));
     }
 }
 public void PlayPress()
 {
     PlayClickSound();
     loadingScreen.ShowLoading();
     if (OnPlayPress != null)
     {
         StartCoroutine(SceneLoadDelay(OnPlayPress));
     }
 }
    private IEnumerator WaitForInitialization()
    {
        while (!soundManager.Initialized && !sceneLoadingManager.Initialized && !saveManager.Initialized)
        {
            yield return(null);
        }
        //show them the splash screen for a moment before loading
        yield return(new WaitForSeconds(2f));

        //Debug.Log("Managers Initialized");
        loadingScreen.ShowLoading();
        yield return(new WaitForSeconds(1f));

        sceneLoadingManager.LoadSceneAsync("MainMenu");
    }