- Make the startAnimation and stopAnimation variables private so you don’t accidentally break your own code by changing their initial values.
- Create a new function called startDiggingUpChestAnimation.
- In the function, set startAnimation to true, set stopAnimation to false, and set elapsedTime to 0.
Scripting Part 3: Finishing the Game Loop
Challenge: Make a Function on the ChestScript to Start Moving It
You don’t have access to this lesson
Please register or sign in to access the course content.