Reviewing the Animator component

There is one final component in the CucumberMan Controller object to review: the Animator component. As you can see in the following screenshot, the Animator component has two key properties: Controller and Avatar:

The controller points to the CucumberMan.controller file. The file's .controller file extension will not be displayed in the component interface, but it is a reference to that file. You can navigate to that file in the project pane. It is located under Assets | Cucumber Man. When you double-click that file, it opens in an Animator window, as shown in the following screenshot:

Here, you can see each of the states, one for each animation, along with the possible transitions between them. Each state is labeled with a CM_ prefix to indicate the CucumberMan. These states are listed as follows:

  • CM_Idle
  • CM_Walk
  • CM_Run
  • CM_Jump
  • CM_Throw
  • CM_Die

If the layout of the Animator window is jumbled or unclear, you can rearrange the objects in the Animator window so they are easy to understand. You accomplish this by clicking on a state, dragging it to where you want it, and releasing the mouse button. The following graphic shows one possible organizational approach to the Cucumber Man's states and transitions. Your approach can differ, if you like:

You can leave these transitions as they have been provided to you, or, if you want to, you can make changes using the Animator window.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset