mirror of https://github.com/ppy/osu
Improve test scene
This commit is contained in:
parent
a2ddb4edb4
commit
808e216059
|
@ -1,8 +1,10 @@
|
|||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Rulesets.Osu.Scoring;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Screens.Ranking.Statistics;
|
||||
|
||||
|
@ -13,7 +15,16 @@ public class TestSceneStatisticsPanel : OsuTestScene
|
|||
[Test]
|
||||
public void TestScore()
|
||||
{
|
||||
loadPanel(new TestScoreInfo(new OsuRuleset().RulesetInfo));
|
||||
var score = new TestScoreInfo(new OsuRuleset().RulesetInfo)
|
||||
{
|
||||
ExtraStatistics =
|
||||
{
|
||||
["timing_distribution"] = TestSceneTimingDistributionGraph.CreateNormalDistribution(),
|
||||
["hit_offsets"] = new List<HitOffset>()
|
||||
}
|
||||
};
|
||||
|
||||
loadPanel(score);
|
||||
}
|
||||
|
||||
private void loadPanel(ScoreInfo score) => AddStep("load panel", () =>
|
||||
|
|
|
@ -22,7 +22,7 @@ public TestSceneTimingDistributionGraph()
|
|||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = Color4Extensions.FromHex("#333")
|
||||
},
|
||||
new TimingDistributionGraph(createNormalDistribution())
|
||||
new TimingDistributionGraph(CreateNormalDistribution())
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
|
@ -31,7 +31,7 @@ public TestSceneTimingDistributionGraph()
|
|||
};
|
||||
}
|
||||
|
||||
private TimingDistribution createNormalDistribution()
|
||||
public static TimingDistribution CreateNormalDistribution()
|
||||
{
|
||||
var distribution = new TimingDistribution(51, 5);
|
||||
|
||||
|
|
Loading…
Reference in New Issue