180 likes | 284 Vues
Develop an interactive tutorial using a bunny and cat in a world, teaching how to manipulate properties, create methods and events to make them interact. Learn accessors, modifiers, functions, and more. This tutorial is designed for Tutorials 12-14 coding practice.
E N D
Using Accessor && Modifiers Protecting your 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!