// 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.Rulesets.Objects; namespace osu.Game.Rulesets.Difficulty.Preprocessing { /// /// Wraps a and provides additional information to be used for difficulty calculation. /// public class DifficultyHitObject { /// /// The this wraps. /// public readonly HitObject BaseObject; /// /// The last which occurs before . /// public readonly HitObject LastObject; /// /// Amount of time elapsed between and . /// public readonly double DeltaTime; /// /// Clockrate adjusted start time of . /// public readonly double StartTime; /// /// Clockrate adjusted end time of . /// public readonly double EndTime; /// /// Creates a new . /// /// The which this wraps. /// The last which occurs before in the beatmap. /// The rate at which the gameplay clock is run at. public DifficultyHitObject(HitObject hitObject, HitObject lastObject, double clockRate) { BaseObject = hitObject; LastObject = lastObject; DeltaTime = (hitObject.StartTime - lastObject.StartTime) / clockRate; StartTime = hitObject.StartTime / clockRate; EndTime = hitObject.GetEndTime() / clockRate; } } }