1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-16 11:57:30 +08:00
osu-lazer/osu.Game/Online/Spectator/FrameDataBundle.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1.0 KiB
C#
Raw Normal View History

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.
using System;
using System.Collections.Generic;
using MessagePack;
2020-12-14 17:41:24 +08:00
using Newtonsoft.Json;
using osu.Game.Replays.Legacy;
using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
namespace osu.Game.Online.Spectator
{
[Serializable]
[MessagePackObject]
public class FrameDataBundle
{
[Key(0)]
public FrameHeader Header { get; set; }
[Key(1)]
public IList<LegacyReplayFrame> Frames { get; set; }
public FrameDataBundle(ScoreInfo score, ScoreProcessor scoreProcessor, IList<LegacyReplayFrame> frames)
{
Frames = frames;
Header = new FrameHeader(score, scoreProcessor.GetScoreProcessorStatistics());
}
2020-12-14 17:41:24 +08:00
[JsonConstructor]
public FrameDataBundle(FrameHeader header, IList<LegacyReplayFrame> frames)
2020-12-14 17:41:24 +08:00
{
Header = header;
Frames = frames;
}
}
}