Technical requirements
To get started:
- Download or clone the GitHub repository at https://github.com/PacktPublishing/C-Design-Patterns-with-Unity-First-Edition.
- Open the Ch_17_Starter project folder in Unity Hub.
- In Assets | Scenes, double-click on SampleScene.
The starter project for this chapter is a fun 3D platformer where the objective is to collect all the items in the scene (if you’ve gotten this far in the book, you’re used to those little red orbs). Each item randomly generates how many points you receive when collected, and you can run, jump, collect, and fall off the tallest platform at your leisure. And so as not to leave out visual feedback, the UI displays a simple score counter at the bottom right of the screen.
As for the scripts:
Client.cs
is aSingleton
class that stores the player’s score and the UI text object – we’ll be using ourFaçade
class(es) from here during the chapter...