O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required