Incorporating the non-player characters into our game
First, let's simply drag the Beetle.Prefab
from the Assets
/Prefab
folder in the Project
panel to our game in Scene
view. Place the beetle somewhere in front of the Cucumber Man so that the beetle can be seen as soon as you put the game into game mode.
A suggested placement is illustrated in the following screenshot:
When you put the game into game mode, you will notice that the beetle cycles through its animations. If you double-click the Beetle.controller
in the Assets
| Beetle
folder in the Project
panel, you will see, as shown in the following screenshot, that we currently have several animations set to play successively and repeatedly:
This initial setup is intended to give you a first, quick way of previewing the various animations. In the next section, we will modify the animation controller.
Working with the Animation Controller
We will use an Animation Controller to organize our NPCs' animations. The Animation Controller will also...