2020-10-22 10:41:10 +00:00
|
|
|
// 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.
|
|
|
|
|
2020-12-14 08:33:23 +00:00
|
|
|
#nullable enable
|
|
|
|
|
2020-10-21 10:05:20 +00:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
2021-01-26 07:39:35 +00:00
|
|
|
using MessagePack;
|
2020-12-14 09:41:24 +00:00
|
|
|
using Newtonsoft.Json;
|
2020-10-21 10:05:20 +00:00
|
|
|
using osu.Game.Replays.Legacy;
|
2020-12-14 08:33:23 +00:00
|
|
|
using osu.Game.Scoring;
|
2020-10-21 10:05:20 +00:00
|
|
|
|
|
|
|
namespace osu.Game.Online.Spectator
|
|
|
|
{
|
|
|
|
[Serializable]
|
2021-01-26 07:39:35 +00:00
|
|
|
[MessagePackObject]
|
2020-10-21 10:05:20 +00:00
|
|
|
public class FrameDataBundle
|
|
|
|
{
|
2021-01-26 07:39:35 +00:00
|
|
|
[Key(0)]
|
2020-12-14 08:33:23 +00:00
|
|
|
public FrameHeader Header { get; set; }
|
|
|
|
|
2021-01-26 07:39:35 +00:00
|
|
|
[Key(1)]
|
2020-10-21 10:05:20 +00:00
|
|
|
public IEnumerable<LegacyReplayFrame> Frames { get; set; }
|
|
|
|
|
2020-12-14 08:33:23 +00:00
|
|
|
public FrameDataBundle(ScoreInfo score, IEnumerable<LegacyReplayFrame> frames)
|
2020-10-21 10:05:20 +00:00
|
|
|
{
|
|
|
|
Frames = frames;
|
2020-12-14 08:33:23 +00:00
|
|
|
Header = new FrameHeader(score);
|
2020-10-21 10:05:20 +00:00
|
|
|
}
|
2020-12-14 09:41:24 +00:00
|
|
|
|
|
|
|
[JsonConstructor]
|
|
|
|
public FrameDataBundle(FrameHeader header, IEnumerable<LegacyReplayFrame> frames)
|
|
|
|
{
|
|
|
|
Header = header;
|
|
|
|
Frames = frames;
|
|
|
|
}
|
2020-10-21 10:05:20 +00:00
|
|
|
}
|
|
|
|
}
|