1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-15 20:47:25 +08:00

Add "Argon" combo counter

This commit is contained in:
Salman Ahmed 2023-10-26 08:59:04 +03:00
parent 1f36acca1a
commit 0aa0562dc0
2 changed files with 30 additions and 0 deletions

View File

@ -17,6 +17,7 @@ namespace osu.Game.Tests.Visual.Gameplay
[Cached]
private ScoreProcessor scoreProcessor = new ScoreProcessor(new OsuRuleset());
protected override Drawable CreateArgonImplementation() => new ArgonComboCounter();
protected override Drawable CreateDefaultImplementation() => new DefaultComboCounter();
protected override Drawable CreateLegacyImplementation() => new LegacyComboCounter();

View File

@ -0,0 +1,29 @@
// 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 osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Screens.Play.HUD
{
public partial class ArgonComboCounter : ComboCounter
{
[BackgroundDependencyLoader]
private void load(ScoreProcessor scoreProcessor)
{
Current.BindTo(scoreProcessor.Combo);
}
protected override OsuSpriteText CreateSpriteText()
=> base.CreateSpriteText().With(s => s.Font = FontUsage.Default.With(size: 36f));
protected override LocalisableString FormatCount(int count)
{
return $@"{count}x";
}
}
}