2019-01-24 08:43:03 +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.
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2017-03-31 06:59:53 +00:00
|
|
|
|
using System.Collections.Generic;
|
2021-07-19 04:02:40 +00:00
|
|
|
|
using System.Linq;
|
2018-11-28 08:20:37 +00:00
|
|
|
|
using osu.Game.Rulesets.Replays;
|
2021-07-19 04:02:40 +00:00
|
|
|
|
using osu.Game.Utils;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2018-11-28 08:20:37 +00:00
|
|
|
|
namespace osu.Game.Replays
|
2017-03-04 10:02:36 +00:00
|
|
|
|
{
|
2021-07-19 04:02:40 +00:00
|
|
|
|
public class Replay : IDeepCloneable<Replay>
|
2017-03-04 10:02:36 +00:00
|
|
|
|
{
|
2020-10-27 07:27:15 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether all frames for this replay have been received.
|
|
|
|
|
/// If false, gameplay would be paused to wait for further data, for instance.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool HasReceivedAllFrames = true;
|
|
|
|
|
|
2017-03-31 06:59:53 +00:00
|
|
|
|
public List<ReplayFrame> Frames = new List<ReplayFrame>();
|
2021-07-19 04:02:40 +00:00
|
|
|
|
|
|
|
|
|
public Replay DeepClone()
|
|
|
|
|
{
|
|
|
|
|
return new Replay
|
|
|
|
|
{
|
|
|
|
|
HasReceivedAllFrames = HasReceivedAllFrames,
|
|
|
|
|
// individual frames are mutable for now but hopefully this will not be a thing in the future.
|
|
|
|
|
Frames = Frames.ToList(),
|
|
|
|
|
};
|
|
|
|
|
}
|
2017-03-04 10:02:36 +00:00
|
|
|
|
}
|
2017-04-18 13:31:52 +00:00
|
|
|
|
}
|