LoadNewScene() private method

private LoadNewScene ( ) : IEnumerator
return IEnumerator
示例#1
0
 public override void Press()
 {
     base.Press();
     if (sceneLoader && sceneName != "")
     {
         sceneLoader.LoadNewScene(sceneName);
     }
 }
示例#2
0
    private void SaveName()
    {
        saveData.ReplaceName(playerData.Name, playerName);

        //save the player name in player prefs
        saveLoadPlayerName.SavePlayerName(playerName);

        //save the name in playerName script
        playerData.Name = playerName;

        sceneLoader.LoadNewScene("MainMenu");
    }
示例#3
0
    public IEnumerator FadeToScene(string sceneName = "MainMenu")
    {
        if (!fadingToScene)
        {
            fadingToScene = true;

            yield return(new WaitForSeconds(.5f));

            yield return(StartCoroutine(fadeImage.FadeTo(0, 1, 1f)));

            if (sceneLoader == null)
            {
                sceneLoader = GetComponent <SceneLoader>();
            }
            sceneLoader.LoadNewScene(sceneName);
        }
    }
示例#4
0
 public override void Press()
 {
     base.Press();
     sceneLoader.LoadNewScene("WelcomeScreen");
 }
示例#5
0
    public void Restart()
    {
        gameSpeed.Reset();

        sceneLoader.LoadNewScene("Game");
    }