mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 07:06:35 +09:00
Add osu! autoplay generation.
Doesn't work on complex sliders yet.
This commit is contained in:
@ -17,7 +17,12 @@ namespace osu.Game.Modes
|
||||
{
|
||||
public class LegacyReplay : Replay
|
||||
{
|
||||
private List<LegacyReplayFrame> frames = new List<LegacyReplayFrame>();
|
||||
protected List<LegacyReplayFrame> Frames = new List<LegacyReplayFrame>();
|
||||
|
||||
protected LegacyReplay()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public LegacyReplay(StreamReader reader)
|
||||
{
|
||||
@ -31,7 +36,7 @@ namespace osu.Game.Modes
|
||||
|
||||
lastTime += float.Parse(split[0]);
|
||||
|
||||
frames.Add(new LegacyReplayFrame(
|
||||
Frames.Add(new LegacyReplayFrame(
|
||||
lastTime,
|
||||
float.Parse(split[1]),
|
||||
384 - float.Parse(split[2]),
|
||||
@ -40,7 +45,7 @@ namespace osu.Game.Modes
|
||||
}
|
||||
}
|
||||
|
||||
public override ReplayInputHandler GetInputHandler() => new LegacyReplayInputHandler(frames);
|
||||
public override ReplayInputHandler GetInputHandler() => new LegacyReplayInputHandler(Frames);
|
||||
|
||||
/// <summary>
|
||||
/// The ReplayHandler will take a replay and handle the propagation of updates to the input stack.
|
||||
|
@ -43,6 +43,8 @@ namespace osu.Game.Modes
|
||||
|
||||
public virtual FontAwesome Icon => FontAwesome.fa_question_circle;
|
||||
|
||||
public virtual Score CreateAutoplayReplay(Beatmap beatmap) => null;
|
||||
|
||||
public static Ruleset GetRuleset(PlayMode mode)
|
||||
{
|
||||
Type type;
|
||||
@ -52,5 +54,6 @@ namespace osu.Game.Modes
|
||||
|
||||
return Activator.CreateInstance(type) as Ruleset;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user