1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00
osu-lazer/osu.Game.Rulesets.Catch/Replays/CatchReplayFrame.cs
2018-03-01 02:28:14 +09:00

35 lines
1011 B
C#

// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Replays;
using osu.Game.Rulesets.Replays.Legacy;
using osu.Game.Rulesets.Replays.Types;
namespace osu.Game.Rulesets.Catch.Replays
{
public class CatchReplayFrame : ReplayFrame, IConvertibleReplayFrame
{
public float X;
public bool Dashing;
public CatchReplayFrame()
{
}
public CatchReplayFrame(double time, float? x = null, bool dashing = false)
: base(time)
{
X = x ?? -1;
Dashing = dashing;
}
public void ConvertFrom(LegacyReplayFrame legacyFrame, Beatmap beatmap)
{
// Todo: This needs to be re-scaled
X = legacyFrame.Position.X;
Dashing = legacyFrame.ButtonState == ReplayButtonState.Left1;
}
}
}