Today's classwork goes along with Chapter 5. You will be writing event handlers with parameters.
The following work needs to be checked off when you have completed it.
You will create a snowy world with penguins that will slide down an icy slope into a pond. Create a world with a lake scene (Environments folder) and three penguins (Animals folder) on the side of a hill. Make the program event-driven. When the user clicks on a penguin, it should slide down the hill on its belly, spin around a few times and when it reaches the pond, falls in (have it move below the pond 5 meters).
Write only one event handling method for the penguins. When any penquin is clicked on, pass the penguin and the number of times to spin as an argument.
Be sure to include instructions with an event that can hide or show. Your instructions should be a billboard.
Optional: add a water splash method when the penguin hits the water.
Pick out a person to play hockey. The book suggest the Jock from the high school folder, but another person is also ok. Setup the scene with a hockey goal (Sports folder) on ice on the lake, and a hockey stick and hocky puck (Sports folder). Also add three GumDrops (Kitchen/Food folder) sitting on the ice in a row off to the side with one yellow, one green and one red. Make sure they are big enough to click on.
The person is holding the hockey stick and in position to swing it to hit the puck into the net. The user will click on a gumdrop that represents the speed the puck will travel (the yellow indicates slow, the green average and the red fast). The person will then swing back (further to go faster) and then hit the puck and it will move based on the speed choice. You can then click restart to play it again.
Be sure to include instructions with an event that can hide or show. Your instructions can be either a billboard or 3D text.
If you finish early, feel free to embelish your animations.