mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 07:42:55 +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()
|
public void SetupSteps()
|
||||||
{
|
{
|
||||||
AddStep("reset clock", () => gameplayClockContainer.Reset(false));
|
AddStep("reset clock", () => gameplayClockContainer.Reset(false));
|
||||||
|
AddStep("set hit objects", setHitObjects);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestDisplay()
|
public void TestDisplay()
|
||||||
{
|
{
|
||||||
AddStep("display max values", displayMaxValues);
|
|
||||||
AddStep("seek to intro", () => gameplayClockContainer.Seek(gameplay_start_time));
|
AddStep("seek to intro", () => gameplayClockContainer.Seek(gameplay_start_time));
|
||||||
AddStep("start", gameplayClockContainer.Start);
|
AddStep("start", gameplayClockContainer.Start);
|
||||||
AddStep("stop", gameplayClockContainer.Stop);
|
AddStep("stop", gameplayClockContainer.Stop);
|
||||||
@ -59,17 +59,12 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
AddStep("show graph", () => progress.ShowGraph.Value = true);
|
AddStep("show graph", () => progress.ShowGraph.Value = true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void displayMaxValues()
|
private void setHitObjects()
|
||||||
{
|
{
|
||||||
var objects = new List<HitObject>();
|
var objects = new List<HitObject>();
|
||||||
for (double i = 0; i < 5000; i++)
|
for (double i = 0; i < 5000; i++)
|
||||||
objects.Add(new HitObject { StartTime = i });
|
objects.Add(new HitObject { StartTime = i });
|
||||||
|
|
||||||
setObjects(objects);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setObjects(List<HitObject> objects)
|
|
||||||
{
|
|
||||||
this.ChildrenOfType<SongProgress>().ForEach(progress => progress.Objects = objects);
|
this.ChildrenOfType<SongProgress>().ForEach(progress => progress.Objects = objects);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user