Пример #1
0
 public void Update(GameTime gameTime)
 {
     _bossTimer.Update(gameTime);
     CacheGridSize();
     for (int i = Paths.Count - 1; i >= 0; i--)
     {
         Paths[i].Update(gameTime);
         if (Paths[i].Sequence == Path.Animation.Despawn)
         {
             OldPaths.Add(Paths[i]);
             Paths.RemoveAt(i);
         }
     }
     for (int i = OldPaths.Count - 1; i >= 0; i--)
     {
         OldPaths[i].Update(gameTime);
         if (OldPaths[i].Done)
         {
             OldPaths.RemoveAt(i);
         }
     }
     if (Paths.Count < Utility.GameDifficulty / 4 + 1)
     {
         GeneratePath();
     }
     if (_bossTimer.IsExpired)
     {
         Paths[0].AddMinion(new Minion(0, 0, Utility.MinionType.Boss));
         _bossTimer.Reset();
     }
 }
Пример #2
0
 public void ResetPaths()
 {
     Paths.Clear();
     OldPaths.Clear();
     _bossTimer.Reset();
 }