Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Part_1;
- public class main {
- public static void main(String[] args) {
- // get dx, dy from user
- //
- // start explosion with proper dx, dy
- Projectile o1 = new Projectile();
- o1.start();
- for(int i = 0; i<15; i++) {
- try {
- Thread.sleep(500);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- System.out.println("o1=>"+o1.t0String());
- }
- o1.explode();
- o1.reset();
- Projectile o2 = new Projectile();
- o2.start();
- for(int i = 0; i<15; i++) {
- try {
- Thread.sleep(356);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- System.out.println("o1=>"+o1.t0String());
- }
- o2.explode();
- o2.reset();
- Projectile o3 = new Projectile();
- o3.start();
- for(int i = 0; i<15; i++) {
- try {
- Thread.sleep(254);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- System.out.println("o1=>"+o1.t0String());
- }
- o3.explode();
- o3.reset();
- Projectile o4 = new Projectile();
- o4.start();
- for(int i = 0; i<15; i++) {
- try {
- Thread.sleep(700);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- System.out.println("o1=>"+o1.t0String());
- }
- o4.explode();
- o4.reset();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement