Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. package Part_1;
  2.  
  3. public class main {
  4.  
  5. public static void main(String[] args) {
  6.  
  7. // get dx, dy from user
  8. //
  9.  
  10.  
  11. // start explosion with proper dx, dy
  12. Projectile o1 = new Projectile();
  13. o1.start();
  14.  
  15. for(int i = 0; i<15; i++) {
  16.  
  17. try {
  18. Thread.sleep(500);
  19. } catch (InterruptedException e) {
  20. // TODO Auto-generated catch block
  21. e.printStackTrace();
  22. }
  23.  
  24. System.out.println("o1=>"+o1.t0String());
  25.  
  26. }
  27.  
  28. o1.explode();
  29. o1.reset();
  30.  
  31. Projectile o2 = new Projectile();
  32. o2.start();
  33.  
  34. for(int i = 0; i<15; i++) {
  35.  
  36. try {
  37. Thread.sleep(356);
  38. } catch (InterruptedException e) {
  39. // TODO Auto-generated catch block
  40. e.printStackTrace();
  41. }
  42.  
  43. System.out.println("o1=>"+o1.t0String());
  44.  
  45. }
  46.  
  47. o2.explode();
  48. o2.reset();
  49.  
  50. Projectile o3 = new Projectile();
  51. o3.start();
  52.  
  53. for(int i = 0; i<15; i++) {
  54.  
  55. try {
  56. Thread.sleep(254);
  57. } catch (InterruptedException e) {
  58. // TODO Auto-generated catch block
  59. e.printStackTrace();
  60. }
  61.  
  62. System.out.println("o1=>"+o1.t0String());
  63.  
  64. }
  65.  
  66. o3.explode();
  67. o3.reset();
  68.  
  69.  
  70. Projectile o4 = new Projectile();
  71. o4.start();
  72.  
  73. for(int i = 0; i<15; i++) {
  74.  
  75. try {
  76. Thread.sleep(700);
  77. } catch (InterruptedException e) {
  78. // TODO Auto-generated catch block
  79. e.printStackTrace();
  80. }
  81.  
  82. System.out.println("o1=>"+o1.t0String());
  83.  
  84. }
  85.  
  86. o4.explode();
  87. o4.reset();
  88.  
  89. }
  90.  
  91.  
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement