Game Development Reference
In-Depth Information
You will access the parameter through scripting via its name, in string format, so the name is not
restricted to the normal variable naming conventions. Many times, you will also need to create a
matching variable in the script. A good practice is to name the variable and the Mecanim parameter
accordingly, e.g., myVariable and “My Variable.” With a new parameter in place, you can refine the
conditions for some of the transitions.
3.
Select the transition from Closed to Gnome arming.
4.
Click the arrows at the right of Exit Time, and select Armed (Figure 11-20 ).
Figure 11-20. Changing the condition that triggers the transition
The default value for the Boolean parameter is true , so you are all set on this one. The empty Closed
state has no animations to blend, so you are also good to go there. The transition from Gnome
arming to Gnome armed is set to use Exit Time. Because the armed clip is so short and is basically
static and the arming clip is relatively long, you can leave the transition as is.
While you are there, however, it would be a good time to check the overlap of the clips.
5.
Select the Transition for Gnome arming to Gnome armed.
6.
Scrub the time indicator in the Preview window to assure yourself that the
transition is okay the way it is.
7.
Next, select the transition from Gnome armed to Gnome disarming.
8.
Set the Condition for this one to Armed and false (Figure 11-21 ).
 
Search WWH ::




Custom Search