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