Exemple #1
0
 public void RemoveDeadSprites()
 {
     foreach (Sprite sprite in DeadSprites)
     {
         LevelSprites.Remove(sprite);
         Game1.Instance.CollisionHandler.AllElements.Remove(sprite);
         if (sprite is ICollidable)
         {
             Game1.Instance.CollisionHandler.CollisionListenersList.Remove((ICollidable)sprite);
         }
     }
     DeadSprites.Clear();
 }
Exemple #2
0
 public void AddDeadSpriteToList(SpriteBase creature)
 {
     DeadSprites.Add(creature);
 }
Exemple #3
0
 public void MarkDead(Sprite sprite)
 {
     DeadSprites.Add(sprite);
 }