Rename startPosition to centrePosition

This commit is contained in:
smoogipoo 2019-10-11 15:41:21 +09:00
parent 8fb2628f9e
commit 5f0cd356d7
2 changed files with 9 additions and 5 deletions

View File

@ -133,8 +133,8 @@ private class TestBeatSnapGrid : BeatSnapGrid
public new float DistanceSpacing => base.DistanceSpacing;
public TestBeatSnapGrid(HitObject hitObject, Vector2 startPosition)
: base(hitObject, startPosition)
public TestBeatSnapGrid(HitObject hitObject, Vector2 centrePosition)
: base(hitObject, centrePosition)
{
}

View File

@ -27,7 +27,11 @@ public abstract class BeatSnapGrid : CompositeDrawable
/// </summary>
protected float DistanceSpacing { get; private set; }
protected readonly Vector2 StartPosition;
/// <summary>
/// The position which the grid is centred on.
/// The first beat snapping tick is located at <see cref="CentrePosition"/> + <see cref="DistanceSpacing"/> in the desired direction.
/// </summary>
protected readonly Vector2 CentrePosition;
[Resolved]
private IEditorBeatmap beatmap { get; set; }
@ -44,10 +48,10 @@ public abstract class BeatSnapGrid : CompositeDrawable
private double startTime;
private double beatLength;
protected BeatSnapGrid(HitObject hitObject, Vector2 startPosition)
protected BeatSnapGrid(HitObject hitObject, Vector2 centrePosition)
{
this.hitObject = hitObject;
this.StartPosition = startPosition;
this.CentrePosition = centrePosition;
RelativeSizeAxes = Axes.Both;
}