Guest User

Untitled

a guest
Mar 23rd, 2019
70
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Game1 : Game
  2. {
  3. [...]
  4. private void CheckAndRemoveEnnemy()
  5. {
  6. for (int i = 0; i < _ennemyShips.Count(); i++)
  7. {
  8. if (_ennemyShips.ElementAt(i).Rectangle.Y > graphics.PreferredBackBufferHeight || _ennemyShips.ElementAt(i).Life <= 0)
  9. {
  10. if (_ennemyShips.ElementAt(i).Life <= 0)
  11. _score++;
  12.  
  13. _ennemyShips.Remove(_ennemyShips.ElementAt(i));
  14. continue;
  15. }
  16. }
  17. }
  18. [...]
  19. }
RAW Paste Data