1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-16 20:32:55 +08:00
osu-lazer/osu.Game.Tests/Visual/Gameplay/TestSceneSkinnableScoreCounter.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1.4 KiB
C#
Raw Normal View History

// 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 NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Scoring;
using osu.Game.Screens.Play.HUD;
using osu.Game.Skinning;
2023-05-25 15:38:22 +08:00
using osu.Game.Tests.Gameplay;
namespace osu.Game.Tests.Visual.Gameplay
{
public partial class TestSceneSkinnableScoreCounter : SkinnableHUDComponentTestScene
{
2023-05-25 15:38:22 +08:00
[Cached(typeof(ScoreProcessor))]
private ScoreProcessor scoreProcessor = TestGameplayState.Create(new OsuRuleset()).ScoreProcessor;
2023-10-23 06:58:41 +08:00
protected override Drawable CreateArgonImplementation() => new ArgonScoreCounter();
protected override Drawable CreateDefaultImplementation() => new DefaultScoreCounter();
protected override Drawable CreateLegacyImplementation() => new LegacyScoreCounter();
[Test]
public void TestScoreCounterIncrementing()
{
AddStep(@"Reset all", () => scoreProcessor.TotalScore.Value = 0);
AddStep(@"Hit! :D", () => scoreProcessor.TotalScore.Value += 300);
}
[Test]
public void TestVeryLargeScore()
{
AddStep("set large score", () => scoreProcessor.TotalScore.Value = 1_000_000_000);
}
}
}