mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 14:17:26 +08:00
Extract interface for solo statistics watcher
This commit is contained in:
parent
27afeb9e30
commit
3e782c5f5f
23
osu.Game/Online/Solo/ISoloStatisticsWatcher.cs
Normal file
23
osu.Game/Online/Solo/ISoloStatisticsWatcher.cs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// 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 System;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Game.Scoring;
|
||||||
|
|
||||||
|
namespace osu.Game.Online.Solo
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A component that delivers updates to the logged in user's gameplay statistics after completed scores.
|
||||||
|
/// </summary>
|
||||||
|
[Cached]
|
||||||
|
public interface ISoloStatisticsWatcher
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Registers for a user statistics update after the given <paramref name="score"/> has been processed server-side.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="score">The score to listen for the statistics update for.</param>
|
||||||
|
/// <param name="onUpdateReady">The callback to be invoked once the statistics update has been prepared.</param>
|
||||||
|
void RegisterForStatisticsUpdateAfter(ScoreInfo score, Action<SoloStatisticsUpdate> onUpdateReady);
|
||||||
|
}
|
||||||
|
}
|
@ -20,7 +20,7 @@ namespace osu.Game.Online.Solo
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// A persistent component that binds to the spectator server and API in order to deliver updates about the logged in user's gameplay statistics.
|
/// A persistent component that binds to the spectator server and API in order to deliver updates about the logged in user's gameplay statistics.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class SoloStatisticsWatcher : Component
|
public partial class SoloStatisticsWatcher : Component, ISoloStatisticsWatcher
|
||||||
{
|
{
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private SpectatorClient spectatorClient { get; set; } = null!;
|
private SpectatorClient spectatorClient { get; set; } = null!;
|
||||||
|
Loading…
Reference in New Issue
Block a user