Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package pipegame;
- /**
- *
- * @author cem
- */
- public class Obstacle extends Rectangle implements Object{
- PipeGame parent;
- public Obstacle(PipeGame parent, int x, int y, int width, int height){
- super(x, y, width, height);
- this.parent = parent;
- }
- public void update() {
- if(isIntersect(parent.ball)){
- parent.ball.velocity.i = 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement