// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Game.Beatmaps; using osu.Game.Replays; using osu.Game.Rulesets.Objects; namespace osu.Game.Rulesets.Replays { public abstract class AutoGenerator { /// /// The default duration of a key press in milliseconds. /// public const double KEY_UP_DELAY = 50; /// /// The beatmap the autoplay is generated for. /// protected IBeatmap Beatmap { get; } protected AutoGenerator(IBeatmap beatmap) { Beatmap = beatmap; } /// /// Generate the replay of the autoplay. /// public abstract Replay Generate(); protected virtual HitObject GetNextObject(int currentIndex) { if (currentIndex >= Beatmap.HitObjects.Count - 1) return null; return Beatmap.HitObjects[currentIndex + 1]; } } }