private static void IncrementMostRecentUnlockedLevel() { var currentWorld = FurthestLevelIndex.Key; var maxLevelInCurrentWorld = StageLoadManager.ReturnAmountOfStagesIn(currentWorld); if (FurthestLevelIndex.Value < maxLevelInCurrentWorld) { var currentLevel = FurthestLevelIndex.Value + 1; FurthestLevelIndex = new KeyValuePair <int, int>(currentWorld, currentLevel); return; } FurthestLevelIndex = new KeyValuePair <int, int>(currentWorld + 1, 0); }
public static int ReturnMostRecentUnlockedLevel() { var returnVariable = 0; var furthestLevelKeyValuePair = FurthestLevelIndex; var totalWorlds = furthestLevelKeyValuePair.Key; for (var i = 0; i < totalWorlds; i++) { if (i > furthestLevelKeyValuePair.Key) { break; } var amountOfLevels = StageLoadManager.ReturnAmountOfStagesIn(i); for (var j = 0; j < amountOfLevels; j++) { if (totalWorlds == i && furthestLevelKeyValuePair.Value < j) { returnVariable++; } } } return(returnVariable); }
public static int ReturnRating(int levelGroup, int level) => LevelRatings[StageLoadManager.ReturnStageIndex(levelGroup, level)];