document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. package BananaShooter;
  2.  
  3. public class Peluru extends Controller {
  4.  
  5. private final int DISPLAY_WIDTH = 390;
  6. private final int PELURU_SPEED = 2;
  7.  
  8. public Peluru(int x, int y) {
  9. super(x, y);
  10.  
  11. initPeluru();
  12. }
  13.  
  14. private void initPeluru() {
  15.  
  16. loadImage("img/peluru.png");
  17. getImageDimensions();
  18. }
  19.  
  20. public void move() {
  21.  
  22. x += PELURU_SPEED;
  23.  
  24. if (x > DISPLAY_WIDTH)
  25. visible = false;
  26. }
  27.  
  28. }
');