Пример #1
0
 /// <summary>
 /// The animation has stopped. Restart it from the beginning.
 /// </summary>
 protected void Restart()
 {
     this.Stop();
     this.Stopwatch.Reset();
     // Reset the components in reverse order so their effects are unwound
     for (int i = this.ControlBlocks.Count - 1; i >= 0; i--)
     {
         AnimateableControlBlock cb = this.ControlBlocks[i];
         cb.Component.Reset();
         cb.StartTick = 0;
         cb.Stopped   = false;
     }
     this.Start();
 }
Пример #2
0
 /// <summary>
 /// Add the given control block to those used by the animation
 /// </summary>
 /// <param name="component"></param>
 /// <returns></returns>
 protected void AddControlBlock(AnimateableControlBlock cb)
 {
     cb.Component.Animation = this;
     this.ControlBlocks.Add(cb);
 }
Пример #3
0
 /// <summary>
 /// Add the given control block to those used by the animation
 /// </summary>
 /// <param name="component"></param>
 /// <returns></returns>
 protected void AddControlBlock(AnimateableControlBlock cb) {
     cb.Component.Animation = this;
     this.ControlBlocks.Add(cb);
 }