Technical requirements
Before you start, follow these steps:
- Download or clone the GitHub repository at https://github.com/PacktPublishing/C-Design-Patterns-with-Unity-First-Edition.
- Open the Ch_08_Starter project folder in Unity Hub.
- In Assets | Scenes, double-click on SampleScene.
The sample project for this chapter is a simple strategy RPG game where you control a player and two allies using key presses (bound to reusable commands). These reusable commands are also interchangeable, so we can configure key bindings any way we want and which character they affect. In the latter sections, we’ll add non-reusable movement commands, which can be applied to any of the characters in the scene but can also be undone or redone at any time!
As for the scripts:
Client.cs
holds a reference to theUIManager
and requiresInputListener.cs
,UnitController.cs,
andInvoker.cs
componentsInputListener.cs
holds references to theUIManager...