diff --git a/osu.Game/Screens/Edit/Compose/Components/BeatSnapGrid.cs b/osu.Game/Screens/Edit/Compose/Components/BeatSnapGrid.cs index d44d53dca7..175d61fd32 100644 --- a/osu.Game/Screens/Edit/Compose/Components/BeatSnapGrid.cs +++ b/osu.Game/Screens/Edit/Compose/Components/BeatSnapGrid.cs @@ -17,8 +17,14 @@ namespace osu.Game.Screens.Edit.Compose.Components { public abstract class BeatSnapGrid : CompositeDrawable { + /// + /// The velocity of the beatmap at the point of placement in pixels per millisecond. + /// protected double Velocity { get; private set; } + /// + /// The spacing between each tick of the beat snapping grid. + /// protected float DistanceSpacing { get; private set; } protected readonly Vector2 StartPosition; @@ -88,32 +94,32 @@ namespace osu.Game.Screens.Edit.Compose.Components } /// - /// Draws the grid. + /// Creates the content which visualises the grid ticks. /// protected abstract void CreateGrid(Vector2 startPosition); /// - /// Retrieves the velocity of gameplay at a time. + /// Retrieves the velocity of gameplay at a point in time in pixels per millisecond. /// /// The time to retrieve the velocity at. - /// The beatmap's at the requested time. - /// The beatmap's at the requested time. - /// The velocity in pixels per millisecond. + /// The beatmap's at the point in time. + /// The beatmap's at the point in time. + /// The velocity. protected abstract float GetVelocity(double time, ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty); /// - /// Snaps a position to this grid. + /// Snaps a screen-space position to this grid. /// /// The original screen-space position. - /// The snapped position. + /// The snapped screen-space position. public abstract Vector2 GetSnapPosition(Vector2 screenSpacePosition); /// - /// Retrieves the time at a snapped position. + /// Retrieves the time at a snapped screen-space position. /// - /// The snapped position. + /// The snapped screen-space position. /// The time at the snapped position. - public double GetSnapTime(Vector2 snappedPosition) => startTime + (ToLocalSpace(snappedPosition) - StartPosition).Length / Velocity; + public double GetSnapTime(Vector2 screenSpacePosition) => startTime + (ToLocalSpace(screenSpacePosition) - CentrePosition).Length / Velocity; /// /// Retrieves the applicable colour for a beat index.