Beispiel #1
0
 public void Play(Animation animation)
 {
     if (animations.Contains(animation))
     {
         currentAnimation = animation;
     }
 }
Beispiel #2
0
 public void Add(Animation animation)
 {
     if (!animations.Contains(animation))
     {
         animations.Add(animation);
     }
 }
Beispiel #3
0
 public void Remove(Animation animation)
 {
     if (animations.Remove(animation))
     {
         if (currentAnimation == animation)
         {
             Stop();
             currentAnimation = null;
         }
     }
 }
Beispiel #4
0
 public void Stop()
 {
     currentAnimation?.Stop();
     currentAnimation = null;
 }