diff --git a/osu.Game/Online/Solo/ISoloStatisticsWatcher.cs b/osu.Game/Online/Solo/ISoloStatisticsWatcher.cs new file mode 100644 index 0000000000..84986297bf --- /dev/null +++ b/osu.Game/Online/Solo/ISoloStatisticsWatcher.cs @@ -0,0 +1,23 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using System; +using osu.Framework.Allocation; +using osu.Game.Scoring; + +namespace osu.Game.Online.Solo +{ + /// + /// A component that delivers updates to the logged in user's gameplay statistics after completed scores. + /// + [Cached] + public interface ISoloStatisticsWatcher + { + /// + /// Registers for a user statistics update after the given has been processed server-side. + /// + /// The score to listen for the statistics update for. + /// The callback to be invoked once the statistics update has been prepared. + void RegisterForStatisticsUpdateAfter(ScoreInfo score, Action onUpdateReady); + } +} diff --git a/osu.Game/Online/Solo/SoloStatisticsWatcher.cs b/osu.Game/Online/Solo/SoloStatisticsWatcher.cs index 48f39504a3..6a9a20e58d 100644 --- a/osu.Game/Online/Solo/SoloStatisticsWatcher.cs +++ b/osu.Game/Online/Solo/SoloStatisticsWatcher.cs @@ -20,7 +20,7 @@ namespace osu.Game.Online.Solo /// /// A persistent component that binds to the spectator server and API in order to deliver updates about the logged in user's gameplay statistics. /// - public partial class SoloStatisticsWatcher : Component + public partial class SoloStatisticsWatcher : Component, ISoloStatisticsWatcher { [Resolved] private SpectatorClient spectatorClient { get; set; } = null!;