Advertisement
afeyajahin

Untitled

Dec 5th, 2021
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. //
  2. // public void checkCollision() {
  3. //
  4. //
  5. // // check collision
  6. // for (Sprite floor: floors) {
  7. // GAME_OVER = GAME_OVER || blob.intersectsSprite(floor);
  8. // }
  9. //
  10. // for (Sprite pipe : upperPipes) {
  11. // GAME_OVER = GAME_OVER || blob.intersectsSprite(pipe);
  12. //
  13. // }
  14. //
  15. // for (Sprite pipe : lowerPipes) {
  16. // GAME_OVER = GAME_OVER || blob.intersectsSprite(pipe);
  17. // }
  18. // //TODO check if blob hit yarn or rats or whatever for points
  19. //
  20. // //if rat hits yarn DEF.score -= 5
  21. //
  22. // for (Sprite yarn : yarns) {
  23. // for (Sprite rat: rats) {
  24. // if(rat.intersectsSprite(yarn)) {
  25. // DEF.score -= 2;
  26. // }
  27. //
  28. //
  29. // }
  30. //
  31. //
  32. // //if blob hits yarn +=5
  33. // for (Sprite Yarn : yarns) {
  34. // if(blob.intersectsSprite(yarn)) {
  35. // DEF.score += 5;
  36. //// System.out.println(DEF.score);
  37. //// scoreLabel.setText(String.valueOf(DEF.score));
  38. ////
  39. //// if (yarn.getCollided() == true) {
  40. //// scoreLabel.setText(String.valueOf(DEF.score));
  41. //// }
  42. //// else if(yarn.getCollided() == false){
  43. //// DEF.score += 5;
  44. //// System.out.println(DEF.score);
  45. //// scoreLabel.setText(String.valueOf(DEF.score));
  46. //// yarn.setCollided(true);
  47. //// }
  48. ////
  49. // }
  50. //
  51. ////
  52. //// }
  53. //// yarn.setCollided(true);
  54. ////
  55. //// }
  56. //// }
  57. // for (Sprite rat : rats) {
  58. // GAME_OVER = GAME_OVER || blob.intersectsSprite(rat);
  59. // }
  60. //
  61. //
  62. //
  63. // // end the game when blob hit stuff
  64. // if (GAME_OVER) {
  65. // showHitEffect();
  66. // for (Sprite floor: floors) {
  67. // floor.setVelocity(0, 0);
  68. // }
  69. // DEF.lives = DEF.lives - 1;
  70. //// DEF.score = 0;
  71. //// scoreLabel.setText(String.valueOf(DEF.score));
  72. // System.out.println(DEF.lives);
  73. // livesLabel.setText(String.valueOf(DEF.lives) + " lives left");
  74. // timer.stop();
  75. // }
  76. // }
  77. // }
  78. // }
  79. //
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement