mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 16:12:57 +08:00
Improve xmldocs
This commit is contained in:
parent
66e0fef85b
commit
8fb2628f9e
@ -17,8 +17,14 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
{
|
{
|
||||||
public abstract class BeatSnapGrid : CompositeDrawable
|
public abstract class BeatSnapGrid : CompositeDrawable
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The velocity of the beatmap at the point of placement in pixels per millisecond.
|
||||||
|
/// </summary>
|
||||||
protected double Velocity { get; private set; }
|
protected double Velocity { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The spacing between each tick of the beat snapping grid.
|
||||||
|
/// </summary>
|
||||||
protected float DistanceSpacing { get; private set; }
|
protected float DistanceSpacing { get; private set; }
|
||||||
|
|
||||||
protected readonly Vector2 StartPosition;
|
protected readonly Vector2 StartPosition;
|
||||||
@ -88,32 +94,32 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Draws the grid.
|
/// Creates the content which visualises the grid ticks.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected abstract void CreateGrid(Vector2 startPosition);
|
protected abstract void CreateGrid(Vector2 startPosition);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieves the velocity of gameplay at a time.
|
/// Retrieves the velocity of gameplay at a point in time in pixels per millisecond.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="time">The time to retrieve the velocity at.</param>
|
/// <param name="time">The time to retrieve the velocity at.</param>
|
||||||
/// <param name="controlPointInfo">The beatmap's <see cref="ControlPointInfo"/> at the requested time.</param>
|
/// <param name="controlPointInfo">The beatmap's <see cref="ControlPointInfo"/> at the point in time.</param>
|
||||||
/// <param name="difficulty">The beatmap's <see cref="BeatmapDifficulty"/> at the requested time.</param>
|
/// <param name="difficulty">The beatmap's <see cref="BeatmapDifficulty"/> at the point in time.</param>
|
||||||
/// <returns>The velocity in pixels per millisecond.</returns>
|
/// <returns>The velocity.</returns>
|
||||||
protected abstract float GetVelocity(double time, ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty);
|
protected abstract float GetVelocity(double time, ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Snaps a position to this grid.
|
/// Snaps a screen-space position to this grid.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="screenSpacePosition">The original screen-space position.</param>
|
/// <param name="screenSpacePosition">The original screen-space position.</param>
|
||||||
/// <returns>The snapped position.</returns>
|
/// <returns>The snapped screen-space position.</returns>
|
||||||
public abstract Vector2 GetSnapPosition(Vector2 screenSpacePosition);
|
public abstract Vector2 GetSnapPosition(Vector2 screenSpacePosition);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieves the time at a snapped position.
|
/// Retrieves the time at a snapped screen-space position.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="snappedPosition">The snapped position.</param>
|
/// <param name="screenSpacePosition">The snapped screen-space position.</param>
|
||||||
/// <returns>The time at the snapped position.</returns>
|
/// <returns>The time at the snapped position.</returns>
|
||||||
public double GetSnapTime(Vector2 snappedPosition) => startTime + (ToLocalSpace(snappedPosition) - StartPosition).Length / Velocity;
|
public double GetSnapTime(Vector2 screenSpacePosition) => startTime + (ToLocalSpace(screenSpacePosition) - CentrePosition).Length / Velocity;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieves the applicable colour for a beat index.
|
/// Retrieves the applicable colour for a beat index.
|
||||||
|
Loading…
Reference in New Issue
Block a user