Attacking and defending with units
The UI is almost finished, and all elements now have scripts attached to them that will update them to reflect what is happening during the gameplay. Now, we need to adjust the scripts responsible for selecting and moving the units and add the new messages and actions. Each action also has a different animation – this is why we must first define what the animation states are that we are going to play in each action or context.
Fortunately, both Warrior and Mage have the same animation states with slight variations on the animation state names. To see the animation states, open the Animator view using the Window | Animation | Animator menu option and, while this window is open, search in the Project view for the FootmanHP Prefab and right-click on the asset to select it. All the animation states will be displayed in the Animator view, as we can see in the following figure:
Figure 7.4: The animation states in the...