whenever it hits the x axis it gets stuck at the top instead of bouncing all around the screen, since i added a class and I cant seem to work it out.
any help would be appreciated thanks!
heres the code (saved as MyAlien)
class Alien {
//body
int bodyXLoc;
int bodyYLoc;
int bodyWidth;
int bodyHeight;
//head
int headWidth;
int headHeight;
int headXLoc;
int headYLoc;
//left eye
int LefteyeWidth;
int LefteyeHeight;
int LefteyeXloc;
int LefteyeYloc;
//right eye
int RighteyeWidth;
int RighteyeHeight;
int RighteyeXloc;
int RighteyeYloc;
//left inner eye
int LinnereyeWidth;
int LinnereyeHeight;
int LinnereyeXloc;
int LinnereyeYloc;
//right inner eye
int RinnereyeWidth;
int RinnereyeHeight;
int RinnereyeXloc;
int RinnereyeYloc;
//nose
int noseWidth;
int noseHeight;
int noseXloc;
int noseYloc;
//hair
int hair1Width;
int hair1Height;
int hair1Xloc;
int hair1Yloc;
int hair2Width;
int hair2Height;
int hair2Xloc;
int hair2Yloc;
int hair3Width;
int hair3Height;
int hair3Xloc;
int hair3Yloc;
int hair4Width;
int hair4Height;
int hair4Xloc;
int hair4Yloc;
int hair5Width;
int hair5Height;
int hair5Xloc;
int hair5Yloc;
int hair6Width;
int hair6Height;
int hair6Xloc;
int hair6Yloc;
//legs
int leg1Width;
int leg1Height;
int leg1Xloc;
int leg1Yloc;
int leg2Width;
int leg2Height;
int leg2Xloc;
int leg2Yloc;
int leg3Width;
int leg3Height;
int leg3Xloc;
int leg3Yloc;
int leg4Width;
int leg4Height;
int leg4Xloc;
int leg4Yloc;
int leg5Width;
int leg5Height;
int leg5Xloc;
int leg5Yloc;
int leg6Width;
int leg6Height;
int leg6Xloc;
int leg6Yloc;
int speed;
int speed2;
Alien(int tempX, int tempY, int tempWidth, int tempHeight, int tempXSpeed, int tempYSpeed) {
bodyXLoc = tempX;
bodyYLoc = tempY;
bodyWidth = tempWidth;
bodyHeight = tempHeight;
speed = tempXSpeed;
speed2 = tempYSpeed;