Update framework (with cached changes) (#5666)

Update framework (with cached changes)
This commit is contained in:
Dean Herbert
2019-08-09 23:47:40 +09:00
committed by GitHub
12 changed files with 16 additions and 16 deletions

View File

@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Osu.Objects
public double EndTime => StartTime + this.SpanCount() * Path.Distance / Velocity;
public double Duration => EndTime - StartTime;
private Cached<Vector2> endPositionCache;
private readonly Cached<Vector2> endPositionCache = new Cached<Vector2>();
public override Vector2 EndPosition => endPositionCache.IsValid ? endPositionCache.Value : endPositionCache.Value = Position + this.CurvePositionAt(1);