To test out the code, we will set it up so that the tick function only calls openChest when the chest is NOT open, and otherwise calls the closeChest function. After that, we just need to reset the elapsedTime and temporarily have the openChest function call the startOpeningLidAnimation function as soon as the open animation finishes.
Testing: Write the Code to Close the Chest Lid
You don’t have access to this lesson
Please register or sign in to access the course content.