220 likes | 284 Views
Learn how to code an interactive world with bunnies and cats! Practice using accessors, modifiers, and events to make the animals move and interact. This tutorial guides you through creating variables, functions, and methods to control the behavior of the bunny and cat in your virtual world.
E N D
Using Accessor && Modifiers Protecting you property
Create an act methodthat has an if statement using the isReadyToJumpFunction
Play • Click on the bunny • She moves up • Click on the bunny • What does she do? • What should she do? • Is this an error? • What kind of error?
Play • Click on the bunny • She moves up • Click on the bunny • She moves down
Do it all again with the a cat • Add a cat object into the world • Redo all the steps above for the cat
Use accessor and modifier methods in your code to alter the properties • Use this code a model when you are writing code for Tutorials 12-14 • If you need to go back and rewrite the code in previous tutorials • If statements are best when they use a function!