private void swoop(){ canMoveLaterally = false; if (swoopingDown) { setLocation(getX(), getY() + 2 ); speed += 10; if (getY() >= maxY) { swoopingDown = false; // Change direction to move up } } // move back up and then only do move method until timer else { if (getY() > minY) { setLocation(getX(), getY() ); speed += 3; } else { swoopingDown = true; // Reset to swoop down again canMoveLaterally = true; speed = 5; } } }
![Twitter](/assets/twitter-4e19209ef84344ee0c433f4c7bad8d49.png)
![Twitter.hover](/assets/twitter.hover-1fb19a5bafc50deace8f88eaec867845.png)