Exemple #1
0
    public void ChangeLevel(string levelName)
    {
        SaveManager.Instance.Save();
        SceneManager.LoadScene(levelName);

        if (SceneManager.GetSceneByName(levelName).buildIndex > levelOneBuildIndex)
        {
            GoldManager.Reset();
        }
    }
Exemple #2
0
    public void ChangeLevel(int levelBuildIndex)
    {
        SaveManager.Instance.Save();
        SceneManager.LoadScene(levelBuildIndex);

        if (levelBuildIndex > levelOneBuildIndex)
        {
            GoldManager.Reset();
        }
    }