2023-06-23 00:37:25 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
2021-06-01 14:57:43 +08:00
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
using osu.Framework.Allocation;
|
2021-06-01 15:16:01 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
2022-03-14 14:51:10 +08:00
|
|
|
|
using osu.Game.Rulesets.Osu;
|
2021-06-01 14:57:43 +08:00
|
|
|
|
using osu.Game.Rulesets.Scoring;
|
2021-06-01 15:16:01 +08:00
|
|
|
|
using osu.Game.Screens.Play.HUD;
|
2022-07-28 08:36:26 +08:00
|
|
|
|
using osu.Game.Skinning;
|
2021-06-01 14:57:43 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual.Gameplay
|
|
|
|
|
{
|
2022-11-24 13:32:20 +08:00
|
|
|
|
public partial class TestSceneSkinnableComboCounter : SkinnableHUDComponentTestScene
|
2021-06-01 14:57:43 +08:00
|
|
|
|
{
|
|
|
|
|
[Cached]
|
2022-03-14 14:51:10 +08:00
|
|
|
|
private ScoreProcessor scoreProcessor = new ScoreProcessor(new OsuRuleset());
|
2021-06-01 14:57:43 +08:00
|
|
|
|
|
2023-10-26 13:59:04 +08:00
|
|
|
|
protected override Drawable CreateArgonImplementation() => new ArgonComboCounter();
|
2021-06-01 15:16:01 +08:00
|
|
|
|
protected override Drawable CreateDefaultImplementation() => new DefaultComboCounter();
|
2023-12-30 10:29:18 +08:00
|
|
|
|
protected override Drawable CreateLegacyImplementation() => new LegacyDefaultComboCounter();
|
2021-06-01 14:57:43 +08:00
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void TestComboCounterIncrementing()
|
|
|
|
|
{
|
|
|
|
|
AddRepeatStep("increase combo", () => scoreProcessor.Combo.Value++, 10);
|
|
|
|
|
|
|
|
|
|
AddStep("reset combo", () => scoreProcessor.Combo.Value = 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|