Exemple #1
0
 public void Animate()
 {
     if (IsStarted)
     {
         lock (SyncObject) {
             try {
                 foreach (AnimationTarget t in AnimationTargets)
                 {
                     if (t != null)
                     {
                         t.Animate();
                     }
                 }
                 while (AnimationTargets.Count > 0 && AnimationTargets.Current.Value.Completed)
                 {
                     AnimationTargets.RemoveLast();
                 }
                 if (AnimationTargets.Count == 0)
                 {
                     Status = AnimationStatus.Idle;
                 }
             } catch (Exception ex) {
                 ex.LogError();
             }
         }
     }
 }