Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. /*
  2. * To change this template, choose Tools | Templates
  3. * and open the template in the editor.
  4. */
  5.  
  6. package pipegame;
  7.  
  8. /**
  9. *
  10. * @author cem
  11. */
  12. public class Obstacle extends Rectangle implements Object{
  13.  
  14. PipeGame parent;
  15.  
  16. public Obstacle(PipeGame parent, int x, int y, int width, int height){
  17. super(x, y, width, height);
  18. this.parent = parent;
  19. }
  20.  
  21. public void update() {
  22. if(isIntersect(parent.ball)){
  23. parent.ball.velocity.i = 0;
  24. }
  25. }
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement