Update ComboCounter components to use DI to attach data source

This commit is contained in:
Dean Herbert
2021-05-03 16:47:47 +09:00
parent d8d2c731ee
commit 625890381f
8 changed files with 41 additions and 57 deletions

View File

@ -7,6 +7,7 @@ using osu.Framework.Graphics;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Rulesets.Scoring;
using osuTK;
namespace osu.Game.Screens.Play.HUD
@ -24,7 +25,11 @@ namespace osu.Game.Screens.Play.HUD
}
[BackgroundDependencyLoader]
private void load(OsuColour colours) => Colour = colours.BlueLighter;
private void load(OsuColour colours, ScoreProcessor scoreProcessor)
{
Colour = colours.BlueLighter;
Current.BindTo(scoreProcessor.Combo);
}
protected override void Update()
{