In this section, we will make the necessary adjustments to our game objects and script functionality that enable the collection of cherries from cherry trees. More specifically, we will create the following gameplay:
- Detect collisions of Cucumber Man and cherry trees
- Simulate collection of cherries
- Update inventory and HUD with cherry count
Before we get started, you should open your Unity game project. Alternatively, you can download the Starting-Chapter-10 Unity project available from the publisher's companion site.