Make EndTime and RepeatCount settable

This commit is contained in:
Dean Herbert
2020-02-05 17:12:26 +09:00
parent dffc58c5fa
commit cd6902a312
9 changed files with 43 additions and 10 deletions

View File

@ -18,7 +18,12 @@ namespace osu.Game.Rulesets.Osu.Objects
{
public class Slider : OsuHitObject, IHasCurve
{
public double EndTime => StartTime + this.SpanCount() * Path.Distance / Velocity;
public double EndTime
{
get => StartTime + this.SpanCount() * Path.Distance / Velocity;
set => throw new System.NotImplementedException();
}
public double Duration => EndTime - StartTime;
private readonly Cached<Vector2> endPositionCache = new Cached<Vector2>();
@ -81,7 +86,7 @@ namespace osu.Game.Rulesets.Osu.Objects
set
{
repeatCount = value;
endPositionCache.Invalidate();
updateNestedPositions();
}
}