2018-01-12 17:35:28 +08:00
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
2018-02-28 15:34:47 +08:00
|
|
|
using osu.Game.Beatmaps;
|
2018-03-01 13:43:45 +08:00
|
|
|
using osu.Game.Rulesets.Catch.UI;
|
2018-01-12 17:35:28 +08:00
|
|
|
using osu.Game.Rulesets.Replays;
|
2018-02-28 15:34:47 +08:00
|
|
|
using osu.Game.Rulesets.Replays.Legacy;
|
|
|
|
using osu.Game.Rulesets.Replays.Types;
|
2018-01-12 17:35:28 +08:00
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Catch.Replays
|
|
|
|
{
|
2018-02-28 15:34:47 +08:00
|
|
|
public class CatchReplayFrame : ReplayFrame, IConvertibleReplayFrame
|
2018-01-12 17:35:28 +08:00
|
|
|
{
|
2018-03-01 00:48:13 +08:00
|
|
|
public float Position;
|
2018-02-28 15:34:47 +08:00
|
|
|
public bool Dashing;
|
2018-01-12 17:35:28 +08:00
|
|
|
|
2018-02-28 23:57:35 +08:00
|
|
|
public CatchReplayFrame()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2018-03-01 00:48:13 +08:00
|
|
|
public CatchReplayFrame(double time, float? position = null, bool dashing = false)
|
2018-02-28 15:34:47 +08:00
|
|
|
: base(time)
|
2018-01-12 17:35:28 +08:00
|
|
|
{
|
2018-03-01 00:48:13 +08:00
|
|
|
Position = position ?? -1;
|
2018-02-28 15:34:47 +08:00
|
|
|
Dashing = dashing;
|
|
|
|
}
|
|
|
|
|
2018-03-01 00:38:40 +08:00
|
|
|
public void ConvertFrom(LegacyReplayFrame legacyFrame, Beatmap beatmap)
|
2018-02-28 15:34:47 +08:00
|
|
|
{
|
2018-03-01 13:43:45 +08:00
|
|
|
Position = legacyFrame.Position.X / CatchPlayfield.BASE_WIDTH;
|
2018-02-28 15:34:47 +08:00
|
|
|
Dashing = legacyFrame.ButtonState == ReplayButtonState.Left1;
|
2018-01-12 17:35:28 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|