Reimplement important frames

This commit is contained in:
smoogipoo 2018-03-01 01:45:41 +09:00
parent fb16c3db87
commit 195b6642e6
4 changed files with 11 additions and 0 deletions

View File

@ -15,6 +15,8 @@ public CatchFramedReplayInputHandler(Replay replay)
{
}
protected override bool IsImportant(CatchReplayFrame frame) => frame.X > 0;
protected float? Position
{
get

View File

@ -2,6 +2,7 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Input;
using osu.Game.Rulesets.Replays;
@ -14,6 +15,8 @@ public ManiaFramedReplayInputHandler(Replay replay)
{
}
protected override bool IsImportant(ManiaReplayFrame frame) => frame.Actions.Any();
public override List<InputState> GetPendingStates() => new List<InputState> { new ReplayState<ManiaAction> { PressedActions = CurrentFrame.Actions } };
}
}

View File

@ -2,6 +2,7 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Input;
using osu.Framework.MathUtils;
using osu.Game.Rulesets.Replays;
@ -16,6 +17,8 @@ public OsuReplayInputHandler(Replay replay)
{
}
protected override bool IsImportant(OsuReplayFrame frame) => frame.Actions.Any();
protected Vector2? Position
{
get

View File

@ -3,6 +3,7 @@
using osu.Game.Rulesets.Replays;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Input;
namespace osu.Game.Rulesets.Taiko.Replays
@ -14,6 +15,8 @@ public TaikoFramedReplayInputHandler(Replay replay)
{
}
protected override bool IsImportant(TaikoReplayFrame frame) => frame.Actions.Any();
public override List<InputState> GetPendingStates() => new List<InputState> { new ReplayState<TaikoAction> { PressedActions = CurrentFrame.Actions } };
}
}