diff --git a/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableNote.cs b/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableNote.cs index 9f30221fde..52e343ba25 100644 --- a/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableNote.cs +++ b/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableNote.cs @@ -26,14 +26,8 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables [Resolved] private OsuColour colours { get; set; } - [Resolved(canBeNull: true)] - private ManiaRulesetConfigManager config { get; set; } - private readonly Bindable configColourCodedNotes = new Bindable(); - [Resolved(canBeNull: true)] - private SnapFinder snapFinder { get; set; } - protected virtual ManiaSkinComponents Component => ManiaSkinComponents.Note; private readonly Drawable headPiece; @@ -53,13 +47,12 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables }); } - protected override void LoadComplete() + [BackgroundDependencyLoader(true)] + private void load(ManiaRulesetConfigManager rulesetConfig, SnapFinder snapFinder) { - base.LoadComplete(); - if (snapFinder != null) { - config?.BindWith(ManiaRulesetSetting.ColourCodedNotes, configColourCodedNotes); + rulesetConfig?.BindWith(ManiaRulesetSetting.ColourCodedNotes, configColourCodedNotes); HitObject.StartTimeBindable.BindValueChanged(_ => snap.Value = snapFinder.FindSnap(HitObject), true); @@ -115,4 +108,4 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables : (ColourInfo)Colour4.White; } } -} \ No newline at end of file +}