public void astroAnimation ( ) {
|
| |
// The astronaut turns to face the lunarlander door. |
| astronaut .turnToFace( lunarlander.Door ); |
| // The astronaut says, "Hey, don't leave me!" for 2 seconds in duration |
| astronaut .say( Hey, don't leave me! ); duration = 2 seconds |
| // The lunarlander takes off without the astronaut (moved 10 meters up out of view. |
| lunarlander .move( UP , 10 meters ); |
| // The frantic astronaut moves 5 meters in the direction of the missing lunarlander |
| astronaut .move( FORWARD , 5 meters ); |
| // The astronaut turns to face the camera. |
| astronaut .turnToFace( Camera ); |
| // The astronaut says, "I hate when that happens..." for 2 seconds duration. |
| astronaut .say( I hate when that happens... ); duration = 2 seconds |
| // The astronaut turns to face the hyperion_robot |
| astronaut .turnToFace( hyperion_robot ); |
| // The astronaut moves toward the hyperion_robot, slowly. |
| astronaut .moveToward( target = hyperion_robot , amount = 3.5 meters ); duration = 3 seconds |
| // Note: of course your program will include at least 2 more methods. |
| } |