mirror of
https://github.com/ppy/osu.git
synced 2025-02-12 14:43:03 +08:00
Add CanBeNull spec and xmldoc
This commit is contained in:
parent
f1a3b6d0ba
commit
04fa0bff9d
@ -158,8 +158,22 @@ namespace osu.Game.Rulesets
|
||||
|
||||
public abstract DifficultyCalculator CreateDifficultyCalculator(WorkingBeatmap beatmap);
|
||||
|
||||
/// <summary>
|
||||
/// Optionally creates a <see cref="PerformanceCalculator"/> to generate performance data from the provided score.
|
||||
/// </summary>
|
||||
/// <param name="attributes">Difficulty attributes for the beatmap related to the provided score.</param>
|
||||
/// <param name="score">The score to be processed.</param>
|
||||
/// <returns>A performance calculator instance for the provided score.</returns>
|
||||
[CanBeNull]
|
||||
public virtual PerformanceCalculator CreatePerformanceCalculator(DifficultyAttributes attributes, ScoreInfo score) => null;
|
||||
|
||||
/// <summary>
|
||||
/// Optionally creates a <see cref="PerformanceCalculator"/> to generate performance data from the provided score.
|
||||
/// </summary>
|
||||
/// <param name="beatmap">The beatmap to use as a source for generating <see cref="DifficultyAttributes"/>.</param>
|
||||
/// <param name="score">The score to be processed.</param>
|
||||
/// <returns>A performance calculator instance for the provided score.</returns>
|
||||
[CanBeNull]
|
||||
public PerformanceCalculator CreatePerformanceCalculator(WorkingBeatmap beatmap, ScoreInfo score)
|
||||
{
|
||||
var difficultyCalculator = CreateDifficultyCalculator(beatmap);
|
||||
|
Loading…
Reference in New Issue
Block a user