Use getters of `OriginalX` and `XOffset`

This commit is contained in:
ekrctb 2021-06-22 17:35:30 +09:00
parent ae1b1cbec9
commit 175d666906
2 changed files with 3 additions and 3 deletions

View File

@ -33,11 +33,11 @@ public override bool HandleMovement(MoveSelectionEvent<HitObject> moveEvent)
if (hitObject is BananaShower) return; if (hitObject is BananaShower) return;
// TODO: confine in bounds // TODO: confine in bounds
hitObject.OriginalXBindable.Value += deltaX; hitObject.OriginalX += deltaX;
// Move the nested hit objects to give an instant result before nested objects are recreated. // Move the nested hit objects to give an instant result before nested objects are recreated.
foreach (var nested in hitObject.NestedHitObjects.OfType<CatchHitObject>()) foreach (var nested in hitObject.NestedHitObjects.OfType<CatchHitObject>())
nested.OriginalXBindable.Value += deltaX; nested.OriginalX += deltaX;
}); });
return true; return true;

View File

@ -64,7 +64,7 @@ public float OriginalX
/// This value is the original <see cref="X"/> value plus the offset applied by the beatmap processing. /// This value is the original <see cref="X"/> value plus the offset applied by the beatmap processing.
/// Use <see cref="OriginalX"/> if a value not affected by the offset is desired. /// Use <see cref="OriginalX"/> if a value not affected by the offset is desired.
/// </remarks> /// </remarks>
public float EffectiveX => OriginalXBindable.Value + XOffsetBindable.Value; public float EffectiveX => OriginalX + XOffset;
public double TimePreempt { get; set; } = 1000; public double TimePreempt { get; set; } = 1000;