
144 5. Sprites and Animation
Aer the velocities are determined, use them to change the x and y position
of the ship like this:
ship.setX(ship.getX() + frameTime * Xvelocity); // Apply X velocity
4. (Challenging.) Make the spaceship appear to orbit the planet as viewed from above.
at is, the ship should travel in a circle on the screen.
5. (Very challenging.) Make the spaceship appear to orbit the planet as it ies in front
of and then behind the planet. Start the ship 1/4 of the way across the screen and
centered vertically. Make the ship get bigger in size as it travels from le to right
until it is in the center of the screen, then start ...