public void LoadNextLevel() { if (currentLevelIndex == 14) { LoadScene("WorldMap"); return; } currentLevelIndex++; LoadScene(allLevelData[currentLevelIndex].name); OnLevelWasLoaded?.Invoke(); }
public void LoadScene(string levelToLoad) { SceneManager.LoadScene(levelToLoad); OnLevelWasLoaded?.Invoke(); }
public void LoadGameplayScene(string levelToLoad, GameLevelData data) { SceneManager.LoadScene(levelToLoad); currentLevelIndex = data.levelID; OnLevelWasLoaded?.Invoke(); }
public void ReloadScene() { SceneManager.LoadScene(allLevelData[currentLevelIndex].name); OnLevelWasLoaded?.Invoke(); }