mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 20:22:55 +08:00
Expose sorting of hitobjects
This commit is contained in:
parent
485a951281
commit
8f37d2290a
@ -69,7 +69,7 @@ namespace osu.Game.Rulesets.Difficulty
|
||||
if (!beatmap.HitObjects.Any())
|
||||
return CreateDifficultyAttributes(beatmap, mods, skills, clockRate);
|
||||
|
||||
var difficultyHitObjects = CreateDifficultyHitObjects(beatmap, clockRate).OrderBy(h => h.BaseObject.StartTime).ToList();
|
||||
var difficultyHitObjects = SortObjects(CreateDifficultyHitObjects(beatmap, clockRate)).ToList();
|
||||
|
||||
double sectionLength = SectionLength * clockRate;
|
||||
|
||||
@ -100,6 +100,14 @@ namespace osu.Game.Rulesets.Difficulty
|
||||
return CreateDifficultyAttributes(beatmap, mods, skills, clockRate);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sorts a given set of <see cref="DifficultyHitObject"/>s.
|
||||
/// </summary>
|
||||
/// <param name="input">The <see cref="DifficultyHitObject"/>s to sort.</param>
|
||||
/// <returns>The sorted <see cref="DifficultyHitObject"/>s.</returns>
|
||||
protected virtual IEnumerable<DifficultyHitObject> SortObjects(IEnumerable<DifficultyHitObject> input)
|
||||
=> input.OrderBy(h => h.BaseObject.StartTime);
|
||||
|
||||
/// <summary>
|
||||
/// Creates all <see cref="Mod"/> combinations which adjust the <see cref="Beatmap"/> difficulty.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user