1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 09:07:25 +08:00

Centralise hitobject start time calculation

This commit is contained in:
Bartłomiej Dach 2020-04-05 13:50:27 +02:00
parent d68c45e22b
commit 4170c210b2

View File

@ -117,7 +117,7 @@ namespace osu.Game.Rulesets.Osu.Tests
private void testSlider(int index, bool snaking)
{
double startTime = index * 10000 + 3000;
double startTime = hitObjects[index].StartTime;
int repeats = index;
AddStep($"retrieve {(index + 1).ToOrdinalWords()} slider", () =>
{
@ -189,7 +189,10 @@ namespace osu.Game.Rulesets.Osu.Tests
protected override IBeatmap CreateBeatmap(RulesetInfo ruleset) => new Beatmap
{
HitObjects = new List<HitObject>
HitObjects = hitObjects
};
private readonly List<HitObject> hitObjects = new List<HitObject>
{
new Slider
{
@ -229,7 +232,6 @@ namespace osu.Game.Rulesets.Osu.Tests
{
StartTime = 199999,
}
}
};
}
}