2019-01-24 08:43:03 +00:00
|
|
|
|
// 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.
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2018-11-15 20:37:21 +00:00
|
|
|
|
using osu.Framework.Allocation;
|
2020-08-19 04:44:45 +00:00
|
|
|
|
using osu.Framework.Graphics;
|
2021-07-23 20:37:08 +00:00
|
|
|
|
using osu.Framework.Localisation;
|
2020-10-14 08:21:56 +00:00
|
|
|
|
using osu.Game.Graphics;
|
2020-08-19 04:44:45 +00:00
|
|
|
|
using osu.Game.Graphics.Sprites;
|
2021-05-03 07:47:47 +00:00
|
|
|
|
using osu.Game.Rulesets.Scoring;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2022-10-12 09:50:40 +00:00
|
|
|
|
namespace osu.Game.Screens.Play.HUD
|
2017-04-07 12:20:31 +00:00
|
|
|
|
{
|
2022-10-12 07:39:57 +00:00
|
|
|
|
public partial class DefaultComboCounter : ComboCounter
|
2017-04-07 12:20:31 +00:00
|
|
|
|
{
|
2018-11-15 20:37:21 +00:00
|
|
|
|
[BackgroundDependencyLoader]
|
2021-05-03 07:47:47 +00:00
|
|
|
|
private void load(OsuColour colours, ScoreProcessor scoreProcessor)
|
|
|
|
|
{
|
|
|
|
|
Colour = colours.BlueLighter;
|
|
|
|
|
Current.BindTo(scoreProcessor.Combo);
|
|
|
|
|
}
|
2018-11-15 20:37:21 +00:00
|
|
|
|
|
2022-10-12 07:39:57 +00:00
|
|
|
|
protected override OsuSpriteText CreateSpriteText()
|
|
|
|
|
=> base.CreateSpriteText().With(s => s.Font = s.Font.With(size: 20f));
|
|
|
|
|
|
2021-07-23 20:37:08 +00:00
|
|
|
|
protected override LocalisableString FormatCount(int count)
|
2017-04-07 12:20:31 +00:00
|
|
|
|
{
|
|
|
|
|
return $@"{count}x";
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-01-05 11:21:19 +00:00
|
|
|
|
}
|