/// <summary>Cancel animation</summary> public void cancelDelta(iDeltaTimeUpdate obj) { if (delta.Remove(obj)) { cancelled(); } // else // ConsoleLogger.logWarning( "Cancel animation did nothing, it wasn't running" ); }
/// <summary>Start a finite animation that receives time passed since previous frame rendered</summary> public void startDelta(TimeSpan duration, iDeltaTimeUpdate obj, eAnimationTimer time = eAnimationTimer.RelativeTime) { validateDuration(duration, false); delta.AddOrUpdate(obj, new Animation(time, timers[time] + duration)); RunPolicy.animationStarted(content); }
/// <summary>Start an infinite animation that receives time passed since previous frame rendered</summary> public void startDelta(iDeltaTimeUpdate obj, eAnimationTimer time = eAnimationTimer.RelativeTime) { delta.AddOrUpdate(obj, new Animation(time)); RunPolicy.animationStarted(content); }
/// <summary>True if the animation is playing</summary> public bool playingDelta(iDeltaTimeUpdate obj) { return(delta.TryGetValue(obj, out var unused)); }