mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 12:33:01 +08:00
simplify helper methods
This commit is contained in:
parent
db62d4be3a
commit
70ed347b06
@ -38,12 +38,12 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
public void SetupSteps()
|
||||
{
|
||||
AddStep("reset clock", () => gameplayClockContainer.Reset(false));
|
||||
AddStep("set hit objects", setHitObjects);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestDisplay()
|
||||
{
|
||||
AddStep("display max values", displayMaxValues);
|
||||
AddStep("seek to intro", () => gameplayClockContainer.Seek(gameplay_start_time));
|
||||
AddStep("start", gameplayClockContainer.Start);
|
||||
AddStep("stop", gameplayClockContainer.Stop);
|
||||
@ -59,17 +59,12 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
AddStep("show graph", () => progress.ShowGraph.Value = true);
|
||||
}
|
||||
|
||||
private void displayMaxValues()
|
||||
private void setHitObjects()
|
||||
{
|
||||
var objects = new List<HitObject>();
|
||||
for (double i = 0; i < 5000; i++)
|
||||
objects.Add(new HitObject { StartTime = i });
|
||||
|
||||
setObjects(objects);
|
||||
}
|
||||
|
||||
private void setObjects(List<HitObject> objects)
|
||||
{
|
||||
this.ChildrenOfType<SongProgress>().ForEach(progress => progress.Objects = objects);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user