What just happened?

The SpriteSequence element we have introduced has its Item elements-related properties set up in the same way as the AnimatedSprite element. Apart from that, a sprite called "still" was explicitly set as the current one. We defined a number of Sprite objects as children of the SpriteSequence element. This is equivalent to assigning those sprites to the sprites property of the object. The complete state machine that was declared is presented in the following diagram:

A sprite called "still" has just a single frame representing a situation when Benjamin doesn't move. The sprite keeps spinning in the same state due to the ...

Get Game Programming using Qt 5 Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.