mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Rename BaseDifficulty -> Difficulty / BeatmapDifficulty.
This commit is contained in:
@ -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>
|
||||
|
@ -45,7 +45,7 @@ namespace osu.Game.Beatmaps.Formats
|
||||
BeatmapInfo = new BeatmapInfo
|
||||
{
|
||||
Metadata = new BeatmapMetadata(),
|
||||
BaseDifficulty = new BaseDifficulty(),
|
||||
Difficulty = new BeatmapDifficulty(),
|
||||
},
|
||||
};
|
||||
ParseFile(stream, beatmap);
|
||||
|
@ -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":
|
||||
|
Reference in New Issue
Block a user