February 2018
Beginner to intermediate
250 pages
6h 11m
English
Next, we need to set the condition for each transition. The condition decides when a zombie transitions from one state to another, such as from walking to attacking. For our game, we have seven transitions, as shown in Table 5.3. A zombie's starting state is walking and it transitions to either attacking or dying, depending on whether it collides with the player or the Raycaster. If it collides with the Raycaster, the transition is one of the three death animations. If it collides with the player, then it plays an attack before switching to a death:
Read now
Unlock full access