Guest User

dsadwa

a guest
Jan 28th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. void BallLeave(int index)
  2. {
  3. for (int i = 0; i < currentNumberOfBalls; i++)
  4. {
  5. if (projectileXSpeed[i] == 0)
  6. {
  7. if (projectilelocation[i].Y + projectileSize.Height < 0 || projectilelocation[i].Y + projectileSize.Height > ClientSize.Height)
  8. {
  9. index = i;
  10. ballColor[i] = FAKE;
  11. }
  12. }
  13. if (projectileXSpeed[i] > 0)
  14. {
  15. if (projectilelocation[i].X > ClientSize.Width)
  16. {
  17. index = i;
  18. ballColor[i] = FAKE;
  19. }
  20.  
  21. }
  22. if (projectileXSpeed[i] < 0)
  23. {
  24. if (projectilelocation[i].X + projectileSize.Width < 0)
  25. {
  26. index = i;
  27. ballColor[i] = FAKE;
  28. }
  29. }
  30. }
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment