Add accuracy to frame bundle header

This commit is contained in:
Dean Herbert 2020-12-24 14:46:52 +09:00
parent b29a5e2073
commit 1f80f01b53
1 changed files with 8 additions and 1 deletions

View File

@ -14,6 +14,11 @@ namespace osu.Game.Online.Spectator
[Serializable]
public class FrameHeader
{
/// <summary>
/// The current accuracy of the score.
/// </summary>
public double Accuracy { get; set; }
/// <summary>
/// The current combo of the score.
/// </summary>
@ -42,16 +47,18 @@ public FrameHeader(ScoreInfo score)
{
Combo = score.Combo;
MaxCombo = score.MaxCombo;
Accuracy = score.Accuracy;
// copy for safety
Statistics = new Dictionary<HitResult, int>(score.Statistics);
}
[JsonConstructor]
public FrameHeader(int combo, int maxCombo, Dictionary<HitResult, int> statistics, DateTimeOffset receivedTime)
public FrameHeader(int combo, int maxCombo, double accuracy, Dictionary<HitResult, int> statistics, DateTimeOffset receivedTime)
{
Combo = combo;
MaxCombo = maxCombo;
Accuracy = accuracy;
Statistics = statistics;
ReceivedTime = receivedTime;
}