/// <summary>Elapsed time of the specified timer</summary> public TimeSpan this[eAnimationTimer timer] { get { return(readings[(byte)timer]); } }
/// <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>Start an infinite animation that receives total time elapsed</summary> public void startAbs(iAbsoluteTimeUpdate obj, eAnimationTimer time = eAnimationTimer.AbsoluteTime) { absolute.AddOrUpdate(obj, new Animation(time)); RunPolicy.animationStarted(content); }
/// <summary>Start a finite animation that receives a progress value, from 0 to 1.</summary> public void startProgress(TimeSpan duration, iAnimationProgressUpdate obj, eAnimationTimer time = eAnimationTimer.RelativeTime) { validateDuration(duration, true); progress.AddOrUpdate(obj, new ProgressAnimation(time, timers[time], duration)); RunPolicy.animationStarted(content); }
/// <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 a finite animation that receives total time elapsed</summary> public void startAbs(TimeSpan duration, iAbsoluteTimeUpdate obj, eAnimationTimer time = eAnimationTimer.AbsoluteTime) { validateDuration(duration, false); absolute.AddOrUpdate(obj, new Animation(time, timers[time] + duration)); RunPolicy.animationStarted(content); }
public ProgressAnimation(eAnimationTimer timer, TimeSpan now, TimeSpan duration) { this.timer = timer; progressMul = (float)(1.0 / duration.Ticks); start = now; }
public Animation(eAnimationTimer timer) { this.timer = timer; finish = TimeSpan.MaxValue; }
public Animation(eAnimationTimer timer, TimeSpan finish) { this.timer = timer; this.finish = finish; }
/// <summary>Delta time of the specified timer, in seconds since the previous frame rendered</summary> /// <remarks>For absolute and especially for the wallclock timer, be prepared for large values. /// If the window is left minimized for prolonged period of time, you’ll get hours or even days from this method.</remarks> public float delta(eAnimationTimer timer) { return(deltas[(byte)timer]); }