1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-06 21:57:19 +08:00

37 lines
1.1 KiB
C#
Raw Normal View History

// 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 18:19:50 +09:00
using System.Collections.Generic;
using osu.Game.Beatmaps;
2018-11-28 17:20:37 +09:00
using osu.Game.Replays.Legacy;
2018-04-13 18:19:50 +09:00
using osu.Game.Rulesets.Replays;
using osu.Game.Rulesets.Replays.Types;
2018-11-20 16:51:59 +09:00
using osuTK;
2018-04-13 18:19:50 +09:00
namespace osu.Game.Rulesets.Osu.Replays
{
public class OsuReplayFrame : ReplayFrame, IConvertibleReplayFrame
{
public Vector2 Position;
public List<OsuAction> Actions = new List<OsuAction>();
public OsuReplayFrame()
{
}
public OsuReplayFrame(double time, Vector2 position, params OsuAction[] actions)
: base(time)
{
Position = position;
Actions.AddRange(actions);
}
2018-04-19 20:44:38 +09:00
public void ConvertFrom(LegacyReplayFrame legacyFrame, IBeatmap beatmap)
2018-04-13 18:19:50 +09:00
{
Position = legacyFrame.Position;
if (legacyFrame.MouseLeft) Actions.Add(OsuAction.LeftButton);
if (legacyFrame.MouseRight) Actions.Add(OsuAction.RightButton);
}
}
}