mirror of
https://github.com/ppy/osu.git
synced 2025-02-12 13:22:56 +08:00
Add data structure for delivering statistics updates
This commit is contained in:
parent
11321f1a41
commit
f5b3988dd2
42
osu.Game/Online/Solo/SoloStatisticsUpdate.cs
Normal file
42
osu.Game/Online/Solo/SoloStatisticsUpdate.cs
Normal file
@ -0,0 +1,42 @@
|
||||
// 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 osu.Game.Scoring;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Online.Solo
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains data about the change in a user's profile statistics after completing a score.
|
||||
/// </summary>
|
||||
public class SoloStatisticsUpdate
|
||||
{
|
||||
/// <summary>
|
||||
/// The score set by the user that triggered the update.
|
||||
/// </summary>
|
||||
public ScoreInfo Score { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The user's profile statistics prior to the score being set.
|
||||
/// </summary>
|
||||
public UserStatistics Before { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The user's profile statistics after the score was set.
|
||||
/// </summary>
|
||||
public UserStatistics After { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="SoloStatisticsUpdate"/>.
|
||||
/// </summary>
|
||||
/// <param name="score">The score set by the user that triggered the update.</param>
|
||||
/// <param name="before">The user's profile statistics prior to the score being set.</param>
|
||||
/// <param name="after">The user's profile statistics after the score was set.</param>
|
||||
public SoloStatisticsUpdate(ScoreInfo score, UserStatistics before, UserStatistics after)
|
||||
{
|
||||
Score = score;
|
||||
Before = before;
|
||||
After = after;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user