/// <summary> /// Raises the StartedNewLevel event as well as incrementing the level index and /// increasing the background scrolling speed. /// Intended to be called each time a new level is started beyond the first level. /// </summary> private void StartNewLevel() { if (currentLevelIndex < finalLevelIndex) { currentLevelIndex++; IncreaseScrollSpeed(); StartedNewLevel?.Invoke(currentLevelIndex); } }
/// <summary> /// Raises the StartedNewLevel event without incrementing the level index or /// increasing the background scrolling speed. /// Intended to be called only when starting the first level. /// </summary> private void StartFirstLevel() { StartedNewLevel?.Invoke(currentLevelIndex); }