Update cached usage in line with framework changes

This commit is contained in:
Dean Herbert
2019-08-09 19:12:29 +09:00
parent 07cf9f319c
commit 90b1fe81f3
9 changed files with 12 additions and 12 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);