mirror of
https://github.com/ppy/osu.git
synced 2025-03-23 07:18:45 +08:00
Move SliderVelocityAt into TimingInfo, fix xmldoc.
This commit is contained in:
parent
a06c195e1f
commit
8479880d44
@ -43,21 +43,6 @@ namespace osu.Game.Beatmaps
|
||||
TimingInfo = original?.TimingInfo ?? TimingInfo;
|
||||
ComboColors = original?.ComboColors ?? ComboColors;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds the slider velocity at a time.
|
||||
/// </summary>
|
||||
/// <param name="time">The time to find the slider velocity at.</param>
|
||||
/// <returns>The slider velocity in positional length units.</returns>
|
||||
public double SliderVelocityAt(double time)
|
||||
{
|
||||
double scoringDistance = 100 * BeatmapInfo.Difficulty.SliderMultiplier;
|
||||
double beatDistance = TimingInfo.BeatDistanceAt(time);
|
||||
|
||||
if (beatDistance > 0)
|
||||
return scoringDistance / beatDistance * 1000;
|
||||
return scoringDistance;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -102,5 +102,21 @@ namespace osu.Game.Beatmaps.Timing
|
||||
|
||||
return timingPoint ?? ControlPoint.Default;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds the slider velocity at a time.
|
||||
/// </summary>
|
||||
/// <param name="time">The time to find the slider velocity at.</param>
|
||||
/// <returns>The slider velocity in milliseconds.</returns>
|
||||
public double SliderVelocityAt(double time)
|
||||
{
|
||||
const double base_scoring_distance = 100;
|
||||
|
||||
double beatDistance = BeatDistanceAt(time);
|
||||
|
||||
if (beatDistance > 0)
|
||||
return base_scoring_distance / beatDistance * 1000;
|
||||
return base_scoring_distance;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user