Example #1
0
    private IEnumerator goToMainMenu(float seconds)
    {
        yield return(new WaitForSeconds(seconds));

        DestroyGame();

        AsyncOperation async = SceneManager.LoadSceneAsync(0);

        while (!async.isDone)
        {
            _loadingScreen.SetProgress(Mathf.Clamp01(async.progress / 0.9f));
            yield return(null);
        }

        _loadingScreen.Hide(1.0f);
        _mainMenuUIPage.Show();
    }
 public void HideLoadingScreen()
 {
     _loadingScreen?.Hide();
 }