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