mirror of
https://github.com/ppy/osu
synced 2025-04-01 22:48:33 +00:00
temp
This commit is contained in:
parent
7502b64541
commit
8ccff0e9cf
@ -167,9 +167,9 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
var controlPoints = beatmap.ControlPointInfo;
|
var controlPoints = beatmap.ControlPointInfo;
|
||||||
|
|
||||||
Assert.AreEqual(4, controlPoints.TimingPoints.Count);
|
Assert.AreEqual(4, controlPoints.TimingPoints.Count);
|
||||||
Assert.AreEqual(5, controlPoints.DifficultyPoints.Count);
|
Assert.AreEqual(6, controlPoints.DifficultyPoints.Count);
|
||||||
Assert.AreEqual(34, controlPoints.SamplePoints.Count);
|
Assert.AreEqual(34, controlPoints.SamplePoints.Count);
|
||||||
Assert.AreEqual(8, controlPoints.EffectPoints.Count);
|
Assert.AreEqual(9, controlPoints.EffectPoints.Count);
|
||||||
|
|
||||||
var timingPoint = controlPoints.TimingPointAt(0);
|
var timingPoint = controlPoints.TimingPointAt(0);
|
||||||
Assert.AreEqual(956, timingPoint.Time);
|
Assert.AreEqual(956, timingPoint.Time);
|
||||||
@ -191,7 +191,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
Assert.AreEqual(1.0, difficultyPoint.SpeedMultiplier);
|
Assert.AreEqual(1.0, difficultyPoint.SpeedMultiplier);
|
||||||
|
|
||||||
difficultyPoint = controlPoints.DifficultyPointAt(48428);
|
difficultyPoint = controlPoints.DifficultyPointAt(48428);
|
||||||
Assert.AreEqual(0, difficultyPoint.Time);
|
Assert.AreEqual(956, difficultyPoint.Time);
|
||||||
Assert.AreEqual(1.0, difficultyPoint.SpeedMultiplier);
|
Assert.AreEqual(1.0, difficultyPoint.SpeedMultiplier);
|
||||||
|
|
||||||
difficultyPoint = controlPoints.DifficultyPointAt(116999);
|
difficultyPoint = controlPoints.DifficultyPointAt(116999);
|
||||||
|
@ -95,13 +95,13 @@ namespace osu.Game.Beatmaps.ControlPoints
|
|||||||
{
|
{
|
||||||
switch (referencePoint)
|
switch (referencePoint)
|
||||||
{
|
{
|
||||||
case TimingControlPoint _: return TimingPointAt(time);
|
case TimingControlPoint _: return binarySearch(TimingPoints, time);
|
||||||
|
|
||||||
case EffectControlPoint _: return EffectPointAt(time);
|
case EffectControlPoint _: return binarySearch(EffectPoints, time);
|
||||||
|
|
||||||
case SampleControlPoint _: return SamplePointAt(time);
|
case SampleControlPoint _: return binarySearch(SamplePoints, time);
|
||||||
|
|
||||||
case DifficultyControlPoint _: return DifficultyPointAt(time);
|
case DifficultyControlPoint _: return binarySearch(DifficultyPoints, time);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user