Game Development Reference
In-Depth Information
Take a look at the following diagram:
START
false
true
has feather power-up?
true
false
true
is current animation
“copter rotate?
is current animation
“normal”?
false
change animation to
“copter transform”
false
false
change animation to
“copter transform”
animation finished?
false
change animation to
“copter transform”
true
true
true
change animation to
“copter transform”
false
change animation to
“copter transform”
false
change animation to
“copter transform”
true
true
change animation to
“copter transform”
change animation to
“copter transform”
END
This diagram shows a state machine that we will need to implement to correctly
change the states and animations of the bunny head game object. It begins with an
overall check whether the feather power-up has been picked up (and is still active).
Then, subsequent checks will try to find out what the current animation state is to
take the correct actions accordingly.
To find out more about (finite) state machines like the one we used
in the preceding diagram, check out the wiki article at http://
en.wikipedia.org/wiki/Finite_state_machine .
 
Search WWH ::




Custom Search