Ejemplo n.º 1
0
 /// <summary>Elapsed time of the specified timer</summary>
 public TimeSpan this[eAnimationTimer timer]
 {
     get
     {
         return(readings[(byte)timer]);
     }
 }
Ejemplo n.º 2
0
 /// <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);
 }
Ejemplo n.º 3
0
 /// <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);
 }
Ejemplo n.º 4
0
 /// <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);
 }
Ejemplo n.º 5
0
 /// <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);
 }
Ejemplo n.º 6
0
 /// <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);
 }
Ejemplo n.º 7
0
 public ProgressAnimation(eAnimationTimer timer, TimeSpan now, TimeSpan duration)
 {
     this.timer  = timer;
     progressMul = (float)(1.0 / duration.Ticks);
     start       = now;
 }
Ejemplo n.º 8
0
 public Animation(eAnimationTimer timer)
 {
     this.timer = timer;
     finish     = TimeSpan.MaxValue;
 }
Ejemplo n.º 9
0
 public Animation(eAnimationTimer timer, TimeSpan finish)
 {
     this.timer  = timer;
     this.finish = finish;
 }
Ejemplo n.º 10
0
 /// <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]);
 }