private void CheckForDarthModeLeaderBoard() { try { var mode = _levelSelectionFlowCoordinator.GetPrivateField <GameplayMode>("_gameplayMode"); if (mode != GameplayMode.SoloStandard && mode != GameplayMode.SoloNoArrows) { return; } if (_levelCollectionsForGameplayModes == null) { _levelCollectionsForGameplayModes = FindObjectOfType <LevelCollectionsForGameplayModes>(); } var difficultyLevel = _levelDetailViewController.GetPrivateField <IStandardLevelDifficultyBeatmap>("_difficultyLevel"); var levels = _levelCollectionsForGameplayModes.GetLevels(mode); _levelSelectionNavigationController.DismissModalViewController(null, true); _levelSelectionFlowCoordinator.Present(_soloModeSelectionViewController, levels, mode); if (difficultyLevel != null) { int row = listTableView.RowNumberForLevelID(difficultyLevel.level.levelID); tableView.SelectRow(row, true); tableView.ScrollToRow(row, false); _levelDifficultyViewController.SetDifficultyLevels(difficultyLevel.level.difficultyBeatmaps, difficultyLevel); _levelDetailViewController.SetContent(difficultyLevel, mode); } } catch (Exception ex) { Console.WriteLine(ex.Message + "\n" + ex.StackTrace); } }
private void CheckForDarthModeLeaderBoard() { try { var mode = _levelSelectionFlowCoordinator.GetPrivateField <GameplayMode>("_gameplayMode"); if (mode != GameplayMode.SoloStandard && mode != GameplayMode.SoloNoArrows) { return; } if (_levelCollectionsForGameplayModes == null) { _levelCollectionsForGameplayModes = FindObjectOfType <LevelCollectionsForGameplayModes>(); } var difficultyLevel = _levelDetailViewController.GetPrivateField <IStandardLevelDifficultyBeatmap>("_difficultyLevel"); var levels = _levelCollectionsForGameplayModes.GetLevels(mode); /****Doesn't work, abandoned.****/ /*if (Plugin.IsDarthModeOn) * { * foreach (IStandardLevel level in levels) * { * if(!level.levelID.Contains("DarthMaulMode")) * level.SetPrivateField("_levelID", level.levelID + "DarthMaulMode"); * } * } * else * { * foreach (IStandardLevel level in levels) * { * if (level.levelID.Contains("DarthMaulMode")) * level.SetPrivateField("_levelID", StringReplace(level.levelID, "DarthMaulMode", "")); * } * }*/ _levelSelectionNavigationController.DismissModalViewController(null, true); _levelSelectionFlowCoordinator.Present(_soloModeSelectionViewController, levels, mode); if (difficultyLevel != null) { int row = listTableView.RowNumberForLevelID(difficultyLevel.level.levelID); tableView.SelectRow(row, true); tableView.ScrollToRow(row, false); _levelDifficultyViewController.SetDifficultyLevels(difficultyLevel.level.difficultyBeatmaps, difficultyLevel); _levelDetailViewController.SetContent(difficultyLevel, mode); } } catch (Exception ex) { Console.WriteLine(ex.Message + "\n" + ex.StackTrace); } }