Beispiel #1
0
    private IEnumerator LoadSceneCoroutine(string sceneName, BeforeUnloadDelegate beforeUnloadDelegate)
    {
        TransitionCanvas.getInstance().FadeOut(0.5f);
        yield return(StartCoroutine(utils.Coroutine.WaitForRealSeconds(0.5f)));

        beforeUnloadDelegate();
        PlayerScore.Reset();
        SceneManager.LoadScene(sceneName);
    }
Beispiel #2
0
 public void LoadScene(string sceneName, BeforeUnloadDelegate beforeUnloadDelegate)
 {
     StartCoroutine(this.LoadSceneCoroutine(sceneName, beforeUnloadDelegate));
 }