2019-01-24 16:43:03 +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.
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
using osu.Game.Beatmaps;
|
2018-11-28 16:20:37 +08:00
|
|
|
using osu.Game.Replays.Legacy;
|
2018-04-13 17:19:50 +08:00
|
|
|
using osu.Game.Rulesets.Catch.UI;
|
|
|
|
using osu.Game.Rulesets.Replays;
|
|
|
|
using osu.Game.Rulesets.Replays.Types;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Catch.Replays
|
|
|
|
{
|
|
|
|
public class CatchReplayFrame : ReplayFrame, IConvertibleReplayFrame
|
|
|
|
{
|
|
|
|
public float Position;
|
|
|
|
public bool Dashing;
|
|
|
|
|
|
|
|
public CatchReplayFrame()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public CatchReplayFrame(double time, float? position = null, bool dashing = false)
|
|
|
|
: base(time)
|
|
|
|
{
|
|
|
|
Position = position ?? -1;
|
|
|
|
Dashing = dashing;
|
|
|
|
}
|
|
|
|
|
2018-04-19 19:44:38 +08:00
|
|
|
public void ConvertFrom(LegacyReplayFrame legacyFrame, IBeatmap beatmap)
|
2018-04-13 17:19:50 +08:00
|
|
|
{
|
|
|
|
Position = legacyFrame.Position.X / CatchPlayfield.BASE_WIDTH;
|
|
|
|
Dashing = legacyFrame.ButtonState == ReplayButtonState.Left1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|