Rename BaseDifficulty -> Difficulty / BeatmapDifficulty.

This commit is contained in:
smoogipooo
2017-03-16 23:18:02 +09:00
parent 28e006eeb9
commit e0a8c3b1e5
12 changed files with 19 additions and 36 deletions

View File

@ -51,30 +51,13 @@ namespace osu.Game.Beatmaps
/// <returns>The slider velocity in positional length units.</returns>
public double SliderVelocityAt(double time)
{
double scoringDistance = 100 * BeatmapInfo.BaseDifficulty.SliderMultiplier;
double scoringDistance = 100 * BeatmapInfo.Difficulty.SliderMultiplier;
double beatDistance = TimingInfo.BeatDistanceAt(time);
if (beatDistance > 0)
return scoringDistance / beatDistance * 1000;
return scoringDistance;
}
/// <summary>
/// Maps a difficulty value [0, 10] to a two-piece linear range of values.
/// </summary>
/// <param name="difficulty">The difficulty value to be mapped.</param>
/// <param name="min">Minimum of the resulting range which will be achieved by a difficulty value of 0.</param>
/// <param name="mid">Midpoint of the resulting range which will be achieved by a difficulty value of 5.</param>
/// <param name="max">Maximum of the resulting range which will be achieved by a difficulty value of 10.</param>
/// <returns>Value to which the difficulty value maps in the specified range.</returns>
public static double MapDifficultyRange(double difficulty, double min, double mid, double max)
{
if (difficulty > 5)
return mid + (max - mid) * (difficulty - 5) / 5;
if (difficulty < 5)
return mid - (mid - min) * (5 - difficulty) / 5;
return mid;
}
}
/// <summary>

View File

@ -45,7 +45,7 @@ namespace osu.Game.Beatmaps.Formats
BeatmapInfo = new BeatmapInfo
{
Metadata = new BeatmapMetadata(),
BaseDifficulty = new BaseDifficulty(),
Difficulty = new BeatmapDifficulty(),
},
};
ParseFile(stream, beatmap);

View File

@ -144,7 +144,7 @@ namespace osu.Game.Beatmaps.Formats
private void handleDifficulty(Beatmap beatmap, string key, string val)
{
var difficulty = beatmap.BeatmapInfo.BaseDifficulty;
var difficulty = beatmap.BeatmapInfo.Difficulty;
switch (key)
{
case @"HPDrainRate":