180 likes | 274 Views
Learn to program a game with bunny and cat characters using accessor and modifier methods to control their properties and behaviors, including jumping and moving. Utilize functions to check readiness and events to trigger actions when specific conditions are met.
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!