Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 22nd, 2012  |  syntax: Java  |  size: 0.48 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.         }
  2.        
  3.         @Override
  4.         public void run() {
  5.                 for(int i = 0; i < 10; i++) {
  6.                         bomb_x = (int) ((v0 * Math.cos(rad)) * t);
  7.                         bomb_y = (int) (v0 * Math.sin(rad) * t - (g * t * t) / 2);
  8.                         t++;
  9.                         bomb_x = bomb_x + pos_x;
  10.                         bomb_y = -bomb_y + (720 - pos_y);
  11.                        
  12.                        
  13.                         System.out.println("Watek działa x: " + bomb_x + " y:" + bomb_y);
  14.                         try {
  15.                                 Thread.sleep(1000);
  16.                         } catch (InterruptedException e) {
  17.                                 // TODO Auto-generated catch block
  18.                                 e.printStackTrace();
  19.                         }
  20.                 }
  21.         }