Game Programming using Qt 5 Beginner's Guide - Second Edition
by Pavel Strakhov, Witold Wysota, Lorenz Haas
Transitions
The second part of the state machine framework is defining how an object transits from one state to another. Similar to the states property, all items have a transitions property, which takes a list of definitions represented by the Transition objects and provides information about animations that should be played when a particular transition takes place.
A transition is identified by three attributes—the source state, the destination state, and a set of animations. Both the source state name (set to the from property) and the target state name (set to the to property) can be empty, in which case they should be interpreted as "any". If a Transition exists that matches the current state change, its animations will be executed. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access