You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
355 B

package controller;
public class ReboundController extends ObjectController {
@Override
public void updateObject() {
// TODO Auto-generated method stub
if(this.getX() < 30 || this.getX() > 670) {
this.setVX(getVX() * -1);
} else if(this.getY() > 670 || this.getY() < 30)
this.setVY(getVY() * -1); {
}
this.applySpeedVector();
}
}