Esempio n. 1
0
 public void Update(GameTime gameTime)
 {
     if (!IsRunning)
     {
         return;
     }
     if (AllFinished)
     {
         throw new InvalidOperationException("ExplosionManager must be resetted to use it again");
     }
     foreach (var ani in Animations)
     {
         ani.Sheet.Update(gameTime);
     }
     if (Animations.All(x => x.Sheet.IsFinished))
     {
         if (_completedLoops >= MaxLoops - 1)
         {
             Stop();
             AllFinished = true;
             return;
         }
         _completedLoops++;
         ResetAnimations();
     }
 }