NPC taking a hit

We need to take a moment and go back to some of the initial scripts and configurations we did in earlier chapters, where we defined the player character's Animator Controller and BarbarianCharacterController.cs script.

Note: Please refer to Chapter 3, RPG Character Design, to refresh your memory on Animator Controller and Curves.

Open the animator controller we created in Chapter 3, RPG Character Design, named BarbarianAnimatorController. Select the Parameters tab and create new parameters called Attack1, Attack2, and Attack3 of the float datatype. Take a look at the following screenshot:

Animator State Machine

For a refresher, ...

Get Building an RPG with Unity 2018 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.